diff --git a/README.md b/README.md index e6b74439e..d925655a0 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Q | QBasic R | R, Racket, Ragel, Raku, react, ReasonML, reg, reStructuredText, Rexx, Ruby, Rust S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Sed, Smalltalk, Smarty, Snobol, Solidity, SPARQL, SQL, SquidConf, Standard ML, Stylus, Svelte, Swift, SYSTEMD, systemverilog T | TableGen, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, TeX, Thrift, TOML, TradingView, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData -V | VB.net, verilog, VHDL, VimL, vue +V | VB.net, verilog, VHDL, VHS, VimL, vue W | WDTE X | XML, Xorg Y | YAML, YANG diff --git a/lexers/embedded/vhs.xml b/lexers/embedded/vhs.xml new file mode 100644 index 000000000..ee84d1292 --- /dev/null +++ b/lexers/embedded/vhs.xml @@ -0,0 +1,48 @@ + + + VHS + vhs + tape + cassette + *.tape + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lexers/testdata/vhs.actual b/lexers/testdata/vhs.actual new file mode 100644 index 000000000..b629f3b29 --- /dev/null +++ b/lexers/testdata/vhs.actual @@ -0,0 +1,19 @@ +# Where should we write the GIF? +Output demo.gif + +# Set up a 1200x600 terminal with 46px font. +Set FontSize 46 +Set Width 1200 +Set Height 600 + +# Type a command in the terminal. +Type@100ms "echo 'Welcome to VHS!'" + +# Pause for dramatic effect... +Sleep 500ms + +# Run the command by pressing enter. +Enter + +# Admire the output for a bit. +Sleep 5s \ No newline at end of file diff --git a/lexers/testdata/vhs.expected b/lexers/testdata/vhs.expected new file mode 100644 index 000000000..3c305efcb --- /dev/null +++ b/lexers/testdata/vhs.expected @@ -0,0 +1,54 @@ +[ + {"type":"Comment","value":"# Where should we write the GIF?"}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Output"}, + {"type":"TextWhitespace","value":" "}, + {"type":"LiteralString","value":"demo.gif"}, + {"type":"TextWhitespace","value":"\n\n"}, + {"type":"Comment","value":"# Set up a 1200x600 terminal with 46px font."}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Set"}, + {"type":"TextWhitespace","value":" "}, + {"type":"NameBuiltin","value":"FontSize"}, + {"type":"TextWhitespace","value":" "}, + {"type":"LiteralNumber","value":"46"}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Set"}, + {"type":"TextWhitespace","value":" "}, + {"type":"NameBuiltin","value":"Width"}, + {"type":"TextWhitespace","value":" "}, + {"type":"LiteralNumber","value":"1200"}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Set"}, + {"type":"TextWhitespace","value":" "}, + {"type":"NameBuiltin","value":"Height"}, + {"type":"TextWhitespace","value":" "}, + {"type":"LiteralNumber","value":"600"}, + {"type":"TextWhitespace","value":"\n\n"}, + {"type":"Comment","value":"# Type a command in the terminal."}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Type"}, + {"type":"Punctuation", "value": "@"}, + {"type":"LiteralNumber", "value": "100"}, + {"type":"Text", "value": "ms"}, + {"type":"TextWhitespace","value":" "}, + {"type":"LiteralStringDouble","value":"\"echo 'Welcome to VHS!'\""}, + {"type":"TextWhitespace","value":"\n\n"}, + {"type":"Comment","value":"# Pause for dramatic effect..."}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Sleep"}, + {"type":"TextWhitespace","value":" "}, + {"type":"LiteralNumber","value":"500"}, + {"type":"Text","value":"ms"}, + {"type":"TextWhitespace","value":"\n\n"}, + {"type":"Comment","value":"# Run the command by pressing enter."}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Enter"}, + {"type":"TextWhitespace","value":"\n\n"}, + {"type":"Comment","value":"# Admire the output for a bit."}, + {"type":"TextWhitespace","value":"\n"}, + {"type":"Keyword","value":"Sleep"}, + {"type":"TextWhitespace","value":" "}, + {"type":"LiteralNumber","value":"5"}, + {"type":"Text","value":"s"} +]