* Initial commit for MCFunction Lexer + tests * Apply suggestions from code review Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> * added docstring info + fix for run ... command * remove string ending Error tokens * not working - refactor in-progress * fixed: generic property * Update pygments/lexers/mcfunction.py Co-authored-by: Georg Brandl <georg@python.org> * apply some fixes from comments * Update pygments/lexers/mcfunction.py Co-authored-by: Georg Brandl <georg@python.org> * spacing * updated tests and applied more suggestions * fixed comment regex, passes tests Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> Co-authored-by: Georg Brandl <georg@python.org>
39 lines
1.1 KiB
Text
39 lines
1.1 KiB
Text
---input---
|
|
{root: [{compound: 1b}, {compound: 2b, tag: {key: "value"}}]}
|
|
|
|
---tokens---
|
|
'{' Punctuation
|
|
'root' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'[' Punctuation
|
|
'{' Punctuation
|
|
'compound' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'1b' Literal.Number.Integer
|
|
'}' Punctuation
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'{' Punctuation
|
|
'compound' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'2b' Literal.Number.Integer
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'tag' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'{' Punctuation
|
|
'key' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
'value' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
'}' Punctuation
|
|
'}' Punctuation
|
|
']' Punctuation
|
|
'}' Punctuation
|
|
'\n' Text
|