Added lexars
This commit is contained in:
parent
382b2ce94b
commit
f9f64b0558
820 changed files with 149371 additions and 0 deletions
lexers/testdata
88
lexers/testdata/vshell.expected
vendored
Normal file
88
lexers/testdata/vshell.expected
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
[
|
||||
{"type":"CommentHashbang","value":"#!/usr/bin/env -S v run\n"},
|
||||
{"type":"CommentSingle","value":"// The shebang above associates the file to V on Unix-like systems,\n// so it can be run just by specifying the path to the file\n// once it's made executable using `chmod +x`.\n"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"CommentSingle","value":"// print command then execute it\n"},
|
||||
{"type":"KeywordDeclaration","value":"fn"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameFunction","value":"sh"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"NameVariable","value":"cmd"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameBuiltin","value":"string"},
|
||||
{"type":"Punctuation","value":"){"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"NameBuiltin","value":"println"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"LiteralStringDouble","value":"\"❯ "},
|
||||
{"type":"Operator","value":"$"},
|
||||
{"type":"NameVariable","value":"cmd"},
|
||||
{"type":"LiteralStringDouble","value":"\""},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":"\n "},
|
||||
{"type":"NameBuiltin","value":"print"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"NameBuiltin","value":"execute_or_exit"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"NameVariable","value":"cmd"},
|
||||
{"type":"Punctuation","value":")."},
|
||||
{"type":"NameVariable","value":"output"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"Punctuation","value":"}"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"CommentSingle","value":"// Remove if build/ exits, ignore any errors if it doesn't\n"},
|
||||
{"type":"NameBuiltin","value":"rmdir_all"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"LiteralStringSingle","value":"'build'"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Keyword","value":"or"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Punctuation","value":"{"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Punctuation","value":"}"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"CommentSingle","value":"// Create build/, never fails as build/ does not exist\n"},
|
||||
{"type":"NameBuiltin","value":"mkdir"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"LiteralStringSingle","value":"'build'"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"KeywordDeclaration","value":"?"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"CommentSingle","value":"// Move *.v files to build/\n"},
|
||||
{"type":"NameVariable","value":"result"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":":="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameBuiltin","value":"execute"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"LiteralStringSingle","value":"'mv *.v build/'"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"Keyword","value":"if"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameVariable","value":"result"},
|
||||
{"type":"Punctuation","value":"."},
|
||||
{"type":"NameVariable","value":"exit_code"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Operator","value":"!="},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"LiteralNumberInteger","value":"0"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"Punctuation","value":"{"},
|
||||
{"type":"Text","value":"\n\t"},
|
||||
{"type":"NameBuiltin","value":"println"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"NameVariable","value":"result"},
|
||||
{"type":"Punctuation","value":"."},
|
||||
{"type":"NameVariable","value":"output"},
|
||||
{"type":"Punctuation","value":")"},
|
||||
{"type":"Text","value":"\n"},
|
||||
{"type":"Punctuation","value":"}"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"NameFunction","value":"sh"},
|
||||
{"type":"Punctuation","value":"("},
|
||||
{"type":"LiteralStringSingle","value":"'ls'"},
|
||||
{"type":"Punctuation","value":")"}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue