diff --git a/examples/Cargo.kdl b/examples/Cargo.kdl index 7b58dba..f3465b4 100644 --- a/examples/Cargo.kdl +++ b/examples/Cargo.kdl @@ -1,9 +1,9 @@ package { - name "kdl" + name kdl version "0.0.0" description "kat's document language" authors "Kat Marchán " - license-file "LICENSE.md" + license-file LICENSE.md edition "2018" } diff --git a/examples/ci.kdl b/examples/ci.kdl index d5443c7..3dccd83 100644 --- a/examples/ci.kdl +++ b/examples/ci.kdl @@ -1,46 +1,46 @@ // This example is a GitHub Action if it used KDL syntax. // See .github/workflows/ci.yml for the file this was based on. -name "CI" +name CI -on "push" "pull_request" +on push pull_request env { - RUSTFLAGS "-Dwarnings" + RUSTFLAGS -Dwarnings } jobs { fmt_and_docs "Check fmt & build docs" { - runs-on "ubuntu-latest" + runs-on ubuntu-latest steps { step uses="actions/checkout@v1" step "Install Rust" uses="actions-rs/toolchain@v1" { - profile "minimal" - toolchain "stable" - components "rustfmt" - override true + profile minimal + toolchain stable + components rustfmt + override #true } - step "rustfmt" run="cargo fmt --all -- --check" - step "docs" run="cargo doc --no-deps" + step rustfmt run="cargo fmt --all -- --check" + step docs run="cargo doc --no-deps" } } build_and_test "Build & Test" { runs-on "${{ matrix.os }}" strategy { matrix { - rust "1.46.0" "stable" - os "ubuntu-latest" "macOS-latest" "windows-latest" + rust "1.46.0" stable + os ubuntu-latest macOS-latest windows-latest } } steps { step uses="actions/checkout@v1" step "Install Rust" uses="actions-rs/toolchain@v1" { - profile "minimal" + profile minimal toolchain "${{ matrix.rust }}" - components "clippy" - override true + components clippy + override #true } - step "Clippy" run="cargo clippy --all -- -D warnings" + step Clippy run="cargo clippy --all -- -D warnings" step "Run tests" run="cargo test --all --verbose" } } diff --git a/examples/kdl-schema.kdl b/examples/kdl-schema.kdl index 76a1080..041c464 100644 --- a/examples/kdl-schema.kdl +++ b/examples/kdl-schema.kdl @@ -1,374 +1,374 @@ document { info { - title "KDL Schema" lang="en" - description "KDL Schema KDL schema in KDL" lang="en" + title "KDL Schema" lang=en + description "KDL Schema KDL schema in KDL" lang=en author "Kat Marchán" { - link "https://github.com/zkat" rel="self" + link "https://github.com/zkat" rel=self } contributor "Lars Willighagen" { - link "https://github.com/larsgw" rel="self" + link "https://github.com/larsgw" rel=self } - link "https://github.com/zkat/kdl" rel="documentation" - license "Creative Commons Attribution-ShareAlike 4.0 International License" spdx="CC-BY-SA-4.0" { - link "https://creativecommons.org/licenses/by-sa/4.0/" lang="en" + link "https://github.com/zkat/kdl" rel=documentation + license "Creative Commons Attribution-ShareAlike 4.0 International License" spdx=CC-BY-SA-4.0 { + link "https://creativecommons.org/licenses/by-sa/4.0/" lang=en } published "2021-08-31" modified "2021-09-01" } - node "document" { + node document { min 1 max 1 - children id="node-children" { - node "node-names" id="node-names-node" description="Validations to apply specifically to arbitrary node names" { - children ref=r#"[id="validations"]"# + children id=node-children { + node node-names id=node-names-node description="Validations to apply specifically to arbitrary node names" { + children ref=#"[id="validations"]"# } - node "other-nodes-allowed" id="other-nodes-allowed-node" description="Whether to allow child nodes other than the ones explicitly listed. Defaults to 'false'." { + node other-nodes-allowed id=other-nodes-allowed-node description="Whether to allow child nodes other than the ones explicitly listed. Defaults to '#false'." { max 1 value { min 1 max 1 - type "boolean" + type boolean } } - node "tag-names" description="Validations to apply specifically to arbitrary type tag names" { - children ref=r#"[id="validations"]"# + node tag-names description="Validations to apply specifically to arbitrary type tag names" { + children ref=#"[id="validations"]"# } - node "other-tags-allowed" description="Whether to allow child node tags other than the ones explicitly listed. Defaults to 'false'." { + node other-tags-allowed description="Whether to allow child node tags other than the ones explicitly listed. Defaults to '#false'." { max 1 value { min 1 max 1 - type "boolean" + type boolean } } - node "info" description="A child node that describes the schema itself." { + node info description="A child node that describes the schema itself." { children { - node "title" description="The title of the schema or the format it describes" { + node title description="The title of the schema or the format it describes" { value description="The title text" { - type "string" + type string min 1 max 1 } - prop "lang" id="info-lang" description="The language of the text" { - type "string" + prop lang id=info-lang description="The language of the text" { + type string } } - node "description" description="A description of the schema or the format it describes" { + node description description="A description of the schema or the format it describes" { value description="The description text" { - type "string" + type string min 1 max 1 } - prop ref=r#"[id="info-lang"]"# + prop ref=#"[id="info-lang"]"# } - node "author" description="Author of the schema" { - value id="info-person-name" description="Person name" { - type "string" + node author description="Author of the schema" { + value id=info-person-name description="Person name" { + type string min 1 max 1 } - prop "orcid" id="info-orcid" description="The ORCID of the person" { - type "string" - pattern r"\d{4}-\d{4}-\d{4}-\d{4}" + prop orcid id=info-orcid description="The ORCID of the person" { + type string + pattern #"\d{4}-\d{4}-\d{4}-\d{4}"# } children { - node ref=r#"[id="info-link"]"# + node ref=#"[id="info-link"]"# } } - node "contributor" description="Contributor to the schema" { - value ref=r#"[id="info-person-name"]"# - prop ref=r#"[id="info-orcid"]"# + node contributor description="Contributor to the schema" { + value ref=#"[id="info-person-name"]"# + prop ref=#"[id="info-orcid"]"# children { - node ref=r#"[id="info-link"]"# + node ref=#"[id="info-link"]"# } } - node "link" id="info-link" description="Links to itself, and to sources describing it" { + node link id=info-link description="Links to itself, and to sources describing it" { value description="A URL that the link points to" { - type "string" - format "url" "irl" + type string + format url irl min 1 max 1 } - prop "rel" description="The relation between the current entity and the URL" { - type "string" - enum "self" "documentation" + prop rel description="The relation between the current entity and the URL" { + type string + enum self documentation } - prop ref=r#"[id="info-lang"]"# + prop ref=#"[id="info-lang"]"# } - node "license" description="The license(s) that the schema is licensed under" { + node license description="The license(s) that the schema is licensed under" { value description="Name of the used license" { - type "string" + type string min 1 max 1 } - prop "spdx" description="An SPDX license identifier" { - type "string" + prop spdx description="An SPDX license identifier" { + type string } children { - node ref=r#"[id="info-link"]"# + node ref=#"[id="info-link"]"# } } - node "published" description="When the schema was published" { + node published description="When the schema was published" { value description="Publication date" { - type "string" - format "date" + type string + format date min 1 max 1 } - prop "time" id="info-time" description="A time to accompany the date" { - type "string" - format "time" + prop time id=info-time description="A time to accompany the date" { + type string + format time } } - node "modified" description="When the schema was last modified" { + node modified description="When the schema was last modified" { value description="Modification date" { - type "string" - format "date" + type string + format date min 1 max 1 } - prop ref=r#"[id="info-time"]"# + prop ref=#"[id="info-time"]"# } - node "version" description="The version number of this version of the schema" { + node version description="The version number of this version of the schema" { value description="Semver version number" { - type "string" - pattern r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$" + type string + pattern #"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$"# min 1 max 1 } } } } - node "tag" id="tag-node" description="A tag belonging to a child node of `document` or another node." { + node tag id=tag-node description="A tag belonging to a child node of `document` or another node." { value description="The name of the tag. If a tag name is not supplied, the node rules apply to _all_ nodes belonging to the parent." { - type "string" + type string max 1 } - prop "description" description="A description of this node's purpose." { - type "string" + prop description description="A description of this node's purpose." { + type string } - prop "id" description="A globally-unique ID for this node." { - type "string" + prop id description="A globally-unique ID for this node." { + type string } - prop "ref" description="A globally unique reference to another node." { - type "string" - format "kdl-query" + prop ref description="A globally unique reference to another node." { + type string + format kdl-query } children { - node ref=r#"[id="node-names-node"]"# - node ref=r#"[id="other-nodes-allowed-node"]"# - node ref=r#"[id="node-node"]"# + node ref=#"[id="node-names-node"]"# + node ref=#"[id="other-nodes-allowed-node"]"# + node ref=#"[id="node-node"]"# } } - node "node" id="node-node" description="A child node belonging either to `document` or to another `node`. Nodes may be anonymous." { + node node id=node-node description="A child node belonging either to `document` or to another `node`. Nodes may be anonymous." { value description="The name of the node. If a node name is not supplied, the node rules apply to _all_ nodes belonging to the parent." { - type "string" + type string max 1 } - prop "description" description="A description of this node's purpose." { - type "string" + prop description description="A description of this node's purpose." { + type string } - prop "id" description="A globally-unique ID for this node." { - type "string" + prop id description="A globally-unique ID for this node." { + type string } - prop "ref" description="A globally unique reference to another node." { - type "string" - format "kdl-query" + prop ref description="A globally unique reference to another node." { + type string + format kdl-query } children { - node "prop-names" description="Validations to apply specifically to arbitrary property names" { - children ref=r#"[id="validations"]"# + node prop-names description="Validations to apply specifically to arbitrary property names" { + children ref=#"[id="validations"]"# } - node "other-props-allowed" description="Whether to allow properties other than the ones explicitly listed. Defaults to 'false'." { + node other-props-allowed description="Whether to allow properties other than the ones explicitly listed. Defaults to '#false'." { max 1 value { min 1 max 1 - type "boolean" + type boolean } } - node "min" description="minimum number of instances of this node in its parent's children." { + node min description="minimum number of instances of this node in its parent's children." { max 1 value { min 1 max 1 - type "number" + type number } } - node "max" description="maximum number of instances of this node in its parent's children." { + node max description="maximum number of instances of this node in its parent's children." { max 1 value { min 1 max 1 - type "number" + type number } } - node ref=r#"[id="value-tag-node"]"# - node "prop" id="prop-node" description="A node property key/value pair." { + node ref=#"[id="value-tag-node"]"# + node prop id="prop-node" description="A node property key/value pair." { value description="The property key." { - type "string" + type string } - prop "id" description="A globally-unique ID of this property." { - type "string" + prop id description="A globally-unique ID of this property." { + type string } - prop "ref" description="A globally unique reference to another property node." { - type "string" - format "kdl-query" + prop ref description="A globally unique reference to another property node." { + type string + format kdl-query } - prop "description" description="A description of this property's purpose." { - type "string" + prop description description="A description of this property's purpose." { + type string } children description="Property-specific validations." { - node "required" description="Whether this property is required if its parent is present." { + node required description="Whether this property is required if its parent is present." { max 1 value { min 1 max 1 - type "boolean" + type boolean } } } - children id="validations" description="General value validations." { - node "tag" id="value-tag-node" description="The tags associated with this value" { + children id=validations description="General value validations." { + node tag id=value-tag-node description="The tags associated with this value" { max 1 - children ref=r#"[id="validations"]"# + children ref=#"[id="validations"]"# } - node "type" description="The type for this prop's value." { + node type description="The type for this prop's value." { max 1 value { min 1 - type "string" + type string } } - node "enum" description="An enumeration of possible values" { + node enum description="An enumeration of possible values" { max 1 value description="Enumeration choices" { min 1 } } - node "pattern" description="PCRE (Regex) pattern or patterns to test prop values against." { + node pattern description="PCRE (Regex) pattern or patterns to test prop values against." { value { min 1 - type "string" + type string } } - node "min-length" description="Minimum length of prop value, if it's a string." { + node min-length description="Minimum length of prop value, if it's a string." { max 1 value { min 1 - type "number" + type number } } - node "max-length" description="Maximum length of prop value, if it's a string." { + node max-length description="Maximum length of prop value, if it's a string." { max 1 value { min 1 - type "number" + type number } } - node "format" description="Intended data format." { + node format description="Intended data format." { max 1 value { min 1 - type "string" + type string // https://json-schema.org/understanding-json-schema/reference/string.html#format - enum "date-time" "date" "time" "duration" "decimal" "currency" "country-2" "country-3" "country-subdivision" "email" "idn-email" "hostname" "idn-hostname" "ipv4" "ipv6" "url" "url-reference" "irl" "irl-reference" "url-template" "regex" "uuid" "kdl-query" "i8" "i16" "i32" "i64" "u8" "u16" "u32" "u64" "isize" "usize" "f32" "f64" "decimal64" "decimal128" + enum date-time date time duration decimal currency country-2 country-3 country-subdivision email idn-email hostname idn-hostname ipv4 ipv6 url url-reference irl irl-reference url-template regex uuid kdl-query i8 i16 i32 i64 u8 u16 u32 u64 isize usize f32 f64 decimal64 decimal128 } } - node "%" description="Only used for numeric values. Constrains them to be multiples of the given number(s)" { + node % description="Only used for numeric values. Constrains them to be multiples of the given number(s)" { max 1 value { min 1 - type "number" + type number } } - node ">" description="Only used for numeric values. Constrains them to be greater than the given number(s)" { + node > description="Only used for numeric values. Constrains them to be greater than the given number(s)" { max 1 value { min 1 max 1 - type "number" + type number } } - node ">=" description="Only used for numeric values. Constrains them to be greater than or equal to the given number(s)" { + node >= description="Only used for numeric values. Constrains them to be greater than or equal to the given number(s)" { max 1 value { min 1 max 1 - type "number" + type number } } - node "<" description="Only used for numeric values. Constrains them to be less than the given number(s)" { + node < description="Only used for numeric values. Constrains them to be less than the given number(s)" { max 1 value { min 1 max 1 - type "number" + type number } } - node "<=" description="Only used for numeric values. Constrains them to be less than or equal to the given number(s)" { + node <= description="Only used for numeric values. Constrains them to be less than or equal to the given number(s)" { max 1 value { min 1 max 1 - type "number" + type number } } } } - node "value" id="value-node" description="one or more direct node values" { - prop "id" description="A globally-unique ID of this value." { - type "string" + node value id=value-node description="one or more direct node values" { + prop id description="A globally-unique ID of this value." { + type string } - prop "ref" description="A globally unique reference to another value node." { - type "string" - format "kdl-query" + prop ref description="A globally unique reference to another value node." { + type string + format kdl-query } - prop "description" description="A description of this property's purpose." { - type "string" + prop description description="A description of this property's purpose." { + type string } - children ref=r#"[id="validations"]"# + children ref=#"[id="validations"]"# children description="Node value-specific validations" { - node "min" description="minimum number of values for this node." { + node min description="minimum number of values for this node." { max 1 value { min 1 max 1 - type "number" + type number } } - node "max" description="maximum number of values for this node." { + node max description="maximum number of values for this node." { max 1 value { min 1 max 1 - type "number" + type number } } } } - node "children" id="children-node" { - prop "id" description="A globally-unique ID of this children node." { - type "string" + node children id=children-node { + prop id description="A globally-unique ID of this children node." { + type string } - prop "ref" description="A globally unique reference to another children node." { - type "string" - format "kdl-query" + prop ref description="A globally unique reference to another children node." { + type string + format kdl-query } - prop "description" description="A description of this these children's purpose." { - type "string" + prop description description="A description of this these children's purpose." { + type string } - children ref=r#"[id="node-children"]"# + children ref=#"[id="node-children"]"# } } } - node "definitions" description="Definitions to reference in parts of the top-level nodes" { + node definitions description="Definitions to reference in parts of the top-level nodes" { children { - node ref=r#"[id="node-node"]"# - node ref=r#"[id="value-node"]"# - node ref=r#"[id="prop-node"]"# - node ref=r#"[id="children-node"]"# - node ref=r#"[id="tag-node"]"# + node ref=#"[id="node-node"]"# + node ref=#"[id="value-node"]"# + node ref=#"[id="prop-node"]"# + node ref=#"[id="children-node"]"# + node ref=#"[id="tag-node"]"# } } } diff --git a/examples/nuget.kdl b/examples/nuget.kdl index 9ab4aa1..0319999 100644 --- a/examples/nuget.kdl +++ b/examples/nuget.kdl @@ -1,48 +1,48 @@ // Based on https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Clients/NuGet.CommandLine/NuGet.CommandLine.csproj Project { PropertyGroup { - IsCommandLinePackage true + IsCommandLinePackage #true } - Import Project=r"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\build\common.props" - Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" - Import Project="ilmerge.props" + Import Project=#"$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\build\common.props"# + Import Project=Sdk.props Sdk=Microsoft.NET.Sdk + Import Project=ilmerge.props PropertyGroup { - RootNamespace "NuGet.CommandLine" - AssemblyName "NuGet" + RootNamespace NuGet.CommandLine + AssemblyName NuGet AssemblyTitle "NuGet Command Line" - PackageId "NuGet.CommandLine" + PackageId NuGet.CommandLine TargetFramework "$(NETFXTargetFramework)" - GenerateDocumentationFile false + GenerateDocumentationFile #false Description "NuGet Command Line Interface." - ApplicationManifest "app.manifest" - Shipping true - OutputType "Exe" - ComVisible false + ApplicationManifest app.manifest + Shipping #true + OutputType Exe + ComVisible #false // Pack properties - PackProject true - IncludeBuildOutput false + PackProject #true + IncludeBuildOutput #false TargetsForTfmSpecificContentInPackage "$(TargetsForTfmSpecificContentInPackage)" "CreateCommandlineNupkg" - SuppressDependenciesWhenPacking true - DevelopmentDependency true - PackageRequireLicenseAcceptance false - UsePublicApiAnalyzer false + SuppressDependenciesWhenPacking #true + DevelopmentDependency #true + PackageRequireLicenseAcceptance #false + UsePublicApiAnalyzer #false } - Target Name="CreateCommandlineNupkg" { + Target Name=CreateCommandlineNupkg { ItemGroup { - TfmSpecificPackageFile Include=r"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe" { + TfmSpecificPackageFile Include=#"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe"# { PackagePath "tools/" } - TfmSpecificPackageFile Include=r"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.pdb" { + TfmSpecificPackageFile Include=#"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.pdb"# { PackagePath "tools/" } } } ItemGroup Condition="$(DefineConstants.Contains(SIGNED_BUILD))" { - AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo" { + AssemblyAttribute Include=System.Runtime.CompilerServices.InternalsVisibleTo { _Parameter1 "NuGet.CommandLine.FuncTest, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293" } AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo" { @@ -51,81 +51,81 @@ Project { } ItemGroup Condition="!$(DefineConstants.Contains(SIGNED_BUILD))" { - AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo" { - _Parameter1 "NuGet.CommandLine.FuncTest" + AssemblyAttribute Include=System.Runtime.CompilerServices.InternalsVisibleTo { + _Parameter1 NuGet.CommandLine.FuncTest } - AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo" { - _Parameter1 "NuGet.CommandLine.Test" + AssemblyAttribute Include=System.Runtime.CompilerServices.InternalsVisibleTo { + _Parameter1 NuGet.CommandLine.Test } } ItemGroup Condition="$(DefineConstants.Contains(SIGNED_BUILD))" { - AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo" { + AssemblyAttribute Include=System.Runtime.CompilerServices.InternalsVisibleTo { _Parameter1 "NuGet.CommandLine.Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293" } } ItemGroup Condition="!$(DefineConstants.Contains(SIGNED_BUILD))" { - AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo" { - _Parameter1 "NuGet.CommandLine.Test" + AssemblyAttribute Include=System.Runtime.CompilerServices.InternalsVisibleTo { + _Parameter1 NuGet.CommandLine.Test } } ItemGroup { - Reference Include="Microsoft.Build.Utilities.v4.0" - Reference Include="Microsoft.CSharp" - Reference Include="System" - Reference Include="System.ComponentModel.Composition" - Reference Include="System.ComponentModel.Composition.Registration" - Reference Include="System.ComponentModel.DataAnnotations" - Reference Include="System.IO.Compression" - Reference Include="System.Net.Http" - Reference Include="System.Xml" - Reference Include="System.Xml.Linq" - Reference Include="NuGet.Core" { - HintPath r"$(SolutionPackagesFolder)nuget.core\2.14.0-rtm-832\lib\net40-Client\NuGet.Core.dll" - Aliases "CoreV2" + Reference Include=Microsoft.Build.Utilities.v4.0 + Reference Include=Microsoft.CSharp + Reference Include=System + Reference Include=System.ComponentModel.Composition + Reference Include=System.ComponentModel.Composition.Registration + Reference Include=System.ComponentModel.DataAnnotations + Reference Include=System.IO.Compression + Reference Include=System.Net.Http + Reference Include=System.Xml + Reference Include=System.Xml.Linq + Reference Include=NuGet.Core" { + HintPath #"$(SolutionPackagesFolder)nuget.core\2.14.0-rtm-832\lib\net40-Client\NuGet.Core.dll"# + Aliases CoreV2 } } ItemGroup { - PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" - ProjectReference Include=r"$(NuGetCoreSrcDirectory)NuGet.PackageManagement\NuGet.PackageManagement.csproj" - ProjectReference Include=r"$(NuGetCoreSrcDirectory)NuGet.Build.Tasks\NuGet.Build.Tasks.csproj" + PackageReference Include=Microsoft.VisualStudio.Setup.Configuration.Interop + ProjectReference Include=#"$(NuGetCoreSrcDirectory)NuGet.PackageManagement\NuGet.PackageManagement.csproj"# + ProjectReference Include=#"$(NuGetCoreSrcDirectory)NuGet.Build.Tasks\NuGet.Build.Tasks.csproj"# } ItemGroup { - EmbeddedResource Update="NuGetCommand.resx" { - Generator "ResXFileCodeGenerator" - LastGenOutput "NuGetCommand.Designer.cs" + EmbeddedResource Update=NuGetCommand.resx { + Generator ResXFileCodeGenerator + LastGenOutput NuGetCommand.Designer.cs } - Compile Update="NuGetCommand.Designer.cs" { - DesignTime true - AutoGen true - DependentUpon "NuGetCommand.resx" + Compile Update=NuGetCommand.Designer.cs { + DesignTime #true + AutoGen #true + DependentUpon NuGetCommand.resx } - EmbeddedResource Update="NuGetResources.resx" { + EmbeddedResource Update=NuGetResources.resx { // Strings are shared by other projects, use public strings. - Generator "PublicResXFileCodeGenerator" - LastGenOutput "NuGetResources.Designer.cs" + Generator PublicResXFileCodeGenerator + LastGenOutput NuGetResources.Designer.cs } - Compile Update="NuGetResources.Designer.cs" { - DesignTime true - AutoGen true - DependentUpon "NuGetResources.resx" + Compile Update=NuGetResources.Designer.cs { + DesignTime #true + AutoGen #true + DependentUpon NuGetResources.resx } } ItemGroup { - EmbeddedResource Include=r"$(NuGetCoreSrcDirectory)NuGet.Build.Tasks\NuGet.targets" { - Link "NuGet.targets" - SubType "Designer" + EmbeddedResource Include=#"$(NuGetCoreSrcDirectory)NuGet.Build.Tasks\NuGet.targets"# { + Link NuGet.targets + SubType Designer } } // Since we are moving some code and strings from NuGet.CommandLine to NuGet.Commands, we opted to go through normal localization process (build .resources.dll) and then add them to the ILMerged nuget.exe // This will also be called from CI build, after assemblies are localized, since our test infra takes nuget.exe before Localization - Target Name="ILMergeNuGetExe" \ - AfterTargets="Build" \ + Target Name=ILMergeNuGetExe \ + AfterTargets=Build \ Condition="'$(BuildingInsideVisualStudio)' != 'true' and '$(SkipILMergeOfNuGetExe)' != 'true'" \ { PropertyGroup { @@ -133,9 +133,9 @@ Project { ExpectedLocalizedArtifactCount 0 Condition="'$(ExpectedLocalizedArtifactCount)' == ''" } ItemGroup { - BuildArtifacts Include=r"$(OutputPath)\*.dll" Exclude="@(MergeExclude)" + BuildArtifacts Include=#"$(OutputPath)\*.dll"# Exclude="@(MergeExclude)" // NuGet.exe needs all NuGet.Commands.resources.dll merged in - LocalizedArtifacts Include=r"$(ArtifactsDirectory)\NuGet.Commands\**\$(NETFXTargetFramework)\**\*.resources.dll" + LocalizedArtifacts Include=#"$(ArtifactsDirectory)\NuGet.Commands\**\$(NETFXTargetFramework)\**\*.resources.dll"# } Error Text="Build dependencies are inconsistent with mergeinclude specified in ilmerge.props" \ Condition="'@(BuildArtifacts->Count())' != '@(MergeInclude->Count())'" @@ -143,36 +143,36 @@ Project { Condition="'@(LocalizedArtifacts->Count())' != '$(ExpectedLocalizedArtifactCount)'" PropertyGroup { PathToBuiltNuGetExe "$(OutputPath)NuGet.exe" - IlmergeCommand r"$(ILMergeExePath) /lib:$(OutputPath) /out:$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe @(MergeAllowDup -> '/allowdup:%(Identity)', ' ') /log:$(OutputPath)IlMergeLog.txt" + IlmergeCommand #"$(ILMergeExePath) /lib:$(OutputPath) /out:$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe @(MergeAllowDup -> '/allowdup:%(Identity)', ' ') /log:$(OutputPath)IlMergeLog.txt"# IlmergeCommand Condition="Exists($(MS_PFX_PATH))" "$(IlmergeCommand) /delaysign /keyfile:$(MS_PFX_PATH)" // LocalizedArtifacts need fullpath, since there will be duplicate file names IlmergeCommand "$(IlmergeCommand) $(PathToBuiltNuGetExe) @(BuildArtifacts->'%(filename)%(extension)', ' ') @(LocalizedArtifacts->'%(fullpath)', ' ')" } MakeDir Directories="$(ArtifactsDirectory)$(VsixOutputDirName)" - Exec Command="$(IlmergeCommand)" ContinueOnError="false" + Exec Command="$(IlmergeCommand)" ContinueOnError=#false } Import Project="$(BuildCommonDirectory)common.targets" Import Project="$(BuildCommonDirectory)embedinterop.targets" // Do nothing. This basically strips away the framework assemblies from the resulting nuspec. - Target Name="_GetFrameworkAssemblyReferences" DependsOnTargets="ResolveReferences" + Target Name=_GetFrameworkAssemblyReferences DependsOnTargets=ResolveReferences - Target Name="GetSigningInputs" Returns="@(DllsToSign)" { + Target Name=GetSigningInputs Returns="@(DllsToSign)" { ItemGroup { - DllsToSign Include=r"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe" { - StrongName "MsSharedLib72" - Authenticode "Microsoft400" + DllsToSign Include=#"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe"# { + StrongName MsSharedLib72 + Authenticode Microsoft400 } } } - Target Name="GetSymbolsToIndex" Returns="@(SymbolsToIndex)" { + Target Name=GetSymbolsToIndex Returns="@(SymbolsToIndex)" { ItemGroup { - SymbolsToIndex Include=r"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe" - SymbolsToIndex Include=r"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.pdb" + SymbolsToIndex Include=#"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.exe"# + SymbolsToIndex Include=#"$(ArtifactsDirectory)$(VsixOutputDirName)\NuGet.pdb"# } } - Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" + Import Project=Sdk.targets Sdk=Microsoft.NET.Sdk } diff --git a/examples/website.kdl b/examples/website.kdl index a1df90a..b8faafe 100644 --- a/examples/website.kdl +++ b/examples/website.kdl @@ -1,20 +1,20 @@ -!doctype "html" -html lang="en" { +!doctype html +html lang=en { head { - meta charset="utf-8" - meta name="viewport" content="width=device-width, initial-scale=1.0" + meta charset=utf-8 + meta name=viewport content="width=device-width, initial-scale=1.0" meta \ - name="description" \ + name=description \ content="kdl is a document language, mostly based on SDLang, with xml-like semantics that looks like you're invoking a bunch of CLI commands!" title "kdl - Kat's Document Language" - link rel="stylesheet" href="/styles/global.css" + link rel=stylesheet href="/styles/global.css" } body { main { header class="py-10 bg-gray-300" { h1 class="text-4xl text-center" "kdl - Kat's Document Language" } - section class="kdl-section" id="description" { + section class=kdl-section id=description { p { - "kdl is a document language, mostly based on " a href="https://sdlang.org" "SDLang" @@ -22,7 +22,7 @@ html lang="en" { } p "It's meant to be used both as a serialization format and a configuration language, and is relatively light on syntax compared to XML." } - section class="kdl-section" id="design-and-discussion" { + section class=kdl-section id=design-and-discussion { h2 "Design and Discussion" p { - "kdl is still extremely new, and discussion about the format should happen over on the " @@ -32,11 +32,11 @@ html lang="en" { - " page in the Github repo. Feel free to jump in and give us your 2 cents!" } } - section class="kdl-section" id="design-principles" { + section class=kdl-section id=design-principles { h2 "Design Principles" ol { - li "Maintainability" - li "Flexibility" + li Maintainability + li Flexibility li "Cognitive simplicity and Learnability" li "Ease of de/serialization" li "Ease of implementation"