mirror of
https://github.com/alecthomas/chroma.git
synced 2025-02-21 19:06:18 +02:00
It appears that not all the rules from the Pygments Elixir lexer were correctly ported over to Chroma. It was missing mostly the keywords and declarations that are processed in the `get_tokens_unprocessed` function of the Pygments Elixir lexer. This commit adds the missing lines to the Elixir lexer and updates the tests accordingly.
67 lines
2.4 KiB
Plaintext
67 lines
2.4 KiB
Plaintext
[
|
|
{"type":"KeywordDeclaration","value":"defmodule"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameClass","value":"Test"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Keyword","value":"do"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"KeywordDeclaration","value":"defmodule"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameClass","value":"Formatter"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Keyword","value":"do"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"KeywordDeclaration","value":"defstruct"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"["},
|
|
{"type":"LiteralStringSymbol","value":":name"},
|
|
{"type":"Punctuation","value":"]"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Keyword","value":"end"},
|
|
{"type":"Text","value":"\n\n "},
|
|
{"type":"KeywordDeclaration","value":"def"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"hello"},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"Name","value":"name"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Punctuation","value":"\\\\"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"LiteralStringDouble","value":"\"chroma\""},
|
|
{"type":"Punctuation","value":")"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Keyword","value":"do"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Keyword","value":"case"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Name","value":"name"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Keyword","value":"do"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"LiteralStringDouble","value":"\"chroma\""},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Operator","value":"-\u003e"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"NameClass","value":"IO"},
|
|
{"type":"Operator","value":"."},
|
|
{"type":"Name","value":"puts"},
|
|
{"type":"Punctuation","value":"("},
|
|
{"type":"LiteralStringDouble","value":"\"Hello, CHROMA!!\""},
|
|
{"type":"Punctuation","value":")"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Name","value":"other"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Operator","value":"-\u003e"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"Keyword","value":"raise"},
|
|
{"type":"Text","value":" "},
|
|
{"type":"LiteralStringDouble","value":"\"no others please\""},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Keyword","value":"end"},
|
|
{"type":"Text","value":"\n "},
|
|
{"type":"Keyword","value":"end"},
|
|
{"type":"Text","value":"\n"},
|
|
{"type":"Keyword","value":"end"},
|
|
{"type":"Text","value":"\n"}
|
|
]
|