1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-07-15 01:14:21 +02:00

Formatting.

This commit is contained in:
Alec Thomas
2018-12-27 16:13:37 +11:00
parent 3b3f74c6a5
commit 4eb0355de0
6 changed files with 97 additions and 100 deletions

View File

@ -15,13 +15,13 @@ var Sass = internal.Register(MustNewLexer(
CaseInsensitive: true,
},
Rules{
// "root": {
// },
"root": {
{`[ \t]*\n`, Text, nil},
// { `[ \t]*`, ?? <function _indentation at 0x10fcaf1e0> ??, nil },
},
"content": {
// { `//[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x10fcaf378> ??, Push("root") },
// { `/\*[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x10fcaf400> ??, Push("root") },
// { `[ \t]*`, ?? <function _indentation at 0x106932e18> ??, nil },
// { `//[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x106936048> ??, Push("root") },
// { `/\*[^\n]*`, ?? <function _starts_block.<locals>.callback at 0x1069360d0> ??, Push("root") },
{`@import`, Keyword, Push("import")},
{`@for`, Keyword, Push("for")},
{`@(debug|warn|if|while)`, Keyword, Push("value")},
@ -112,9 +112,9 @@ var Sass = internal.Register(MustNewLexer(
{`"`, LiteralStringDouble, Pop(1)},
},
"string-single": {
{`(\\.|#(?=[^\n{])|[^\n'#])+`, LiteralStringDouble, nil},
{`(\\.|#(?=[^\n{])|[^\n'#])+`, LiteralStringSingle, nil},
{`#\{`, LiteralStringInterpol, Push("interpolation")},
{`'`, LiteralStringDouble, Pop(1)},
{`'`, LiteralStringSingle, Pop(1)},
},
"string-url": {
{`(\\#|#(?=[^\n{])|[^\n#)])+`, LiteralStringOther, nil},

View File

@ -26,4 +26,3 @@ var SYSTEMD = internal.Register(MustNewLexer(
},
},
))

View File

@ -1,4 +1,3 @@
package v
import (
@ -12,9 +11,9 @@ const vbName = `[_\w][\w]*`
var VBNet = internal.Register(MustNewLexer(
&Config{
Name: "VB.net",
Aliases: []string{ "vb.net", "vbnet", },
Filenames: []string{ "*.vb", "*.bas", },
MimeTypes: []string{ "text/x-vbnet", "text/x-vba", },
Aliases: []string{"vb.net", "vbnet"},
Filenames: []string{"*.vb", "*.bas"},
MimeTypes: []string{"text/x-vbnet", "text/x-vba"},
CaseInsensitive: true,
},
Rules{
@ -72,4 +71,3 @@ var VBNet = internal.Register(MustNewLexer(
},
},
))