mirror of
https://github.com/alecthomas/chroma.git
synced 2025-02-13 13:28:27 +02:00
323 lines
13 KiB
Plaintext
323 lines
13 KiB
Plaintext
[
|
|
{"type":"NameBuiltin","value":"Get-ChildItem"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-Recurse"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-Force"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-ErrorAction"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"SilentlyContinue"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-Name"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-Path"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"C:"},
|
|
{"type":"Punctuation","value":"\\"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"*."},
|
|
{"type":"Name","value":"txt"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"Comment","value":"#"},
|
|
{"type":"Keyword","value":"Requires"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"KeywordDeclaration","value":"-modules"},
|
|
{"type":"NameAttribute","value":" ModuleName"},
|
|
{"type":"TextWhitespace","value":"\n"},
|
|
{"type":"Comment","value":"#"},
|
|
{"type":"Keyword","value":"Requires"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"KeywordDeclaration","value":"-Assembly"},
|
|
{"type":"NameAttribute","value":" \"System.Management.Automation, Version=1.0.0.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35\""},
|
|
{"type":"TextWhitespace","value":"\n"},
|
|
{"type":"Comment","value":"#"},
|
|
{"type":"Keyword","value":"Requires"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"KeywordDeclaration","value":"-Modules"},
|
|
{"type":"NameAttribute","value":" @{ ModuleName=\"ModuleName\"; ModuleVersion=\"1.2.3\" }"},
|
|
{"type":"TextWhitespace","value":"\n"},
|
|
{"type":"Comment","value":"#"},
|
|
{"type":"Keyword","value":"Requires"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"KeywordDeclaration","value":"-PSSnapin"},
|
|
{"type":"NameAttribute","value":" SnapinName -version 1.2"},
|
|
{"type":"TextWhitespace","value":"\n"},
|
|
{"type":"Comment","value":"#"},
|
|
{"type":"Keyword","value":"Requires"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"KeywordDeclaration","value":"-RunAsAdministrator"},
|
|
{"type":"TextWhitespace","value":"\n"},
|
|
{"type":"Comment","value":"#"},
|
|
{"type":"Keyword","value":"Requires"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"Comment","value":"-WrongParameter"},
|
|
{"type":"NameAttribute","value":" ParamValue"},
|
|
{"type":"TextWhitespace","value":"\n\n"},
|
|
{"type":"CommentMultiline","value":"\u003c#\n Multiline comment\n ."},
|
|
{"type":"LiteralStringDoc","value":"DESCRIPTION"},
|
|
{"type":"CommentMultiline","value":"\n This is a description\n#\u003e"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"Comment","value":"# this is a comment"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"KeywordDeclaration","value":"function"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"NameBuiltin","value":"test"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"{"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"}"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"KeywordDeclaration","value":"class"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"NameBuiltin","value":"test "},
|
|
{"type":"Punctuation","value":"{}"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"KeywordDeclaration","value":"class"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"NameBuiltin","value":"test2 :"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"test"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"{"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"}"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"LiteralStringHeredoc","value":"@\"\ndouble quoted "},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"LiteralStringHeredoc","value":" here string\n\"@"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"LiteralStringHeredoc","value":"@\"\ndouble quoted "},
|
|
{"type":"NameVariable","value":"${MyVar}"},
|
|
{"type":"LiteralStringHeredoc","value":" here string\n\"@"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"LiteralStringHeredoc","value":"@\"\ndouble quoted "},
|
|
{"type":"Punctuation","value":"$("},
|
|
{"type":"NameBuiltin","value":"Get-Stuff"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-Param1"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":")"},
|
|
{"type":"LiteralStringHeredoc","value":" here string\n\"@"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"LiteralStringHeredoc","value":"@'\nsingle quoted $(Get-Stuff -Param1 $MyVar ) here string\n'@"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"LiteralStringSingle","value":"'Single quoted string $MyVar'"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"LiteralStringDouble","value":"\"Double quoted string "},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"LiteralStringDouble","value":"\""},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"LiteralStringDouble","value":"\"Double quoted string "},
|
|
{"type":"Punctuation","value":"$("},
|
|
{"type":"NameBuiltin","value":"Get-Stuff"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-Param1"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":")"},
|
|
{"type":"LiteralStringDouble","value":"\""},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"LiteralStringDouble","value":"\"Double quoted string "},
|
|
{"type":"NameVariable","value":"${var}"},
|
|
{"type":"LiteralStringDouble","value":"\""},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"NameVariable","value":"$HashTable"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameVariableMagic","value":"@"},
|
|
{"type":"Punctuation","value":"{"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"LiteralStringSingle","value":"'Something'"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameVariable","value":"$Var"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"LiteralStringSingle","value":"'Else'"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"Text","value":" "},
|
|
{"type":"LiteralStringSingle","value":"'string'"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"Punctuation","value":"}"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"NameVariable","value":"$myvar"},
|
|
{"type":"Punctuation","value":"."},
|
|
{"type":"LiteralStringSingle","value":"'property name in string'"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameConstant","value":"string"},
|
|
{"type":"Punctuation","value":"]::"},
|
|
{"type":"Name","value":"UseMethod"},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"LiteralNumberFloat","value":"12.34"},
|
|
{"type":"Punctuation","value":")"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"LiteralNumberFloat","value":"15"},
|
|
{"type":"Punctuation","value":"gb"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariableMagic","value":"@"},
|
|
{"type":"Punctuation","value":"{}"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariableMagic","value":"@"},
|
|
{"type":"Punctuation","value":"()"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariableMagic","value":"$"},
|
|
{"type":"Punctuation","value":"()"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariable","value":"$test"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"C:"},
|
|
{"type":"Punctuation","value":"\\"},
|
|
{"type":"Name","value":"test"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameBuiltin","value":"Get-Something"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-SwitchParam:"},
|
|
{"type":"NameVariableMagic","value":"$false"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"Punctuation","value":"."},
|
|
{"type":"NameProperty","value":"property"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"Punctuation","value":"."},
|
|
{"type":"NameProperty","value":"property"},
|
|
{"type":"Punctuation","value":"."},
|
|
{"type":"NameProperty","value":"property"},
|
|
{"type":"Punctuation","value":"."},
|
|
{"type":"NameProperty","value":"somemethod"},
|
|
{"type":"Punctuation","value":"()"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariable","value":"$global:test"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariableMagic","value":"$null"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariableMagic","value":"$true"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"NameVariableMagic","value":"$false"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"KeywordDeclaration","value":"Configuration"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"NameBuiltin","value":"ConfigurationName\n"},
|
|
{"type":"Punctuation","value":"{"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"NameBuiltin","value":"Import-DSCResource"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"-ModuleName"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"MyModule"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"Punctuation","value":"}"},
|
|
{"type":"Text","value":"\n\n"},
|
|
{"type":"KeywordDeclaration","value":"function"},
|
|
{"type":"TextWhitespace","value":" "},
|
|
{"type":"NameBuiltin","value":"Get-Stuff"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"{"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameBuiltin","value":"CmdletBinding"},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"NameAttribute","value":"SupportsShouldProcess"},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"NameVariableMagic","value":"$true"},
|
|
{"type":"Punctuation","value":")]"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Keyword","value":"param"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameBuiltin","value":"Parameter"},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"NameAttribute","value":"Mandatory"},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"NameVariableMagic","value":"$true"},
|
|
{"type":"Punctuation","value":","},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameAttribute","value":"DontShow"},
|
|
{"type":"Punctuation","value":")]"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameBuiltin","value":"ValidateNotNullOrEmpty"},
|
|
{"type":"Punctuation","value":"()]"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameBuiltin","value":"ValidateScript"},
|
|
{"type":"Punctuation","value":"({"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameVariable","value":"$_"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Operator","value":"-ne"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameVariableMagic","value":"$null"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"})]"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameBuiltin","value":"ValidateRange"},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"LiteralNumberFloat","value":"0"},
|
|
{"type":"Punctuation","value":","},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameConstant","value":"int"},
|
|
{"type":"Punctuation","value":"]::"},
|
|
{"type":"Name","value":"MaxValue"},
|
|
{"type":"Punctuation","value":")]"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"NameConstant","value":"Microsoft.PowerShell.Commands.WebRequestMethod"},
|
|
{"type":"Punctuation","value":"]"},
|
|
{"type":"NameVariable","value":"$Param1"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"="},
|
|
{"type":"Text","value":" "},
|
|
{"type":"LiteralStringSingle","value":"'Get'"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":")"},
|
|
{"type":"Text","value":"\n\n "},
|
|
{"type":"Keyword","value":"Process"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"{"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Keyword","value":"if"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"NameVariable","value":"$MyVar"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Operator","value":"-lt"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"NameBuiltin","value":"Get-Date"},
|
|
{"type":"Punctuation","value":")."},
|
|
{"type":"NameProperty","value":"AddSeconds"},
|
|
{"type":"Punctuation","value":"(["},
|
|
{"type":"NameConstant","value":"int"},
|
|
{"type":"Punctuation","value":"]("},
|
|
{"type":"LiteralNumberFloat","value":"12.4"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"/"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"LiteralNumberFloat","value":"2"},
|
|
{"type":"Punctuation","value":")))"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"{}"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Punctuation","value":"}"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"Punctuation","value":"}"}
|
|
]
|