* 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>
43 lines
1.1 KiB
Text
43 lines
1.1 KiB
Text
---input---
|
|
{
|
|
"text": "This is JSON",
|
|
"extra": [
|
|
"however",
|
|
"it's also technically valid SNBT.."
|
|
]
|
|
}
|
|
|
|
---tokens---
|
|
'{' Punctuation
|
|
'\n ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
'text' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
'This is JSON' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
',' Punctuation
|
|
'\n ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
'extra' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'[' Punctuation
|
|
'\n ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
'however' Literal.String.Double
|
|
'"' Literal.String.Double
|
|
',' Punctuation
|
|
'\n ' Text.Whitespace
|
|
'"' Literal.String.Double
|
|
"it's also technically valid SNBT.." Literal.String.Double
|
|
'"' Literal.String.Double
|
|
'\n ' Text.Whitespace
|
|
']' Punctuation
|
|
'\n' Text.Whitespace
|
|
|
|
'}' Punctuation
|
|
'\n' Text
|