* 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>
29 lines
874 B
Text
29 lines
874 B
Text
---input---
|
|
{"special--key": 10b, normal_key: false, "json..///_type_key": "yup"}
|
|
|
|
---tokens---
|
|
'{' Punctuation
|
|
'"' Literal.String.Double
|
|
'special--key' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'10b' Literal.Number.Integer
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'normal_key' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'false' Name.Attribute
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
'json..///_type_key' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
'yup' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
'}' Punctuation
|
|
'\n' Text
|