* 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>
41 lines
1.1 KiB
Text
41 lines
1.1 KiB
Text
---input---
|
|
{int: 1, byte: 0b, short: 1s, long: 10000L, float: 10.0f, double: 20.0}
|
|
|
|
---tokens---
|
|
'{' Punctuation
|
|
'int' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'1' Literal.Number.Integer
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'byte' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'0b' Literal.Number.Integer
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'short' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'1s' Literal.Number.Integer
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'long' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'10000L' Literal.Number.Integer
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'float' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'10.0f' Literal.Number.Float
|
|
',' Punctuation
|
|
' ' Text.Whitespace
|
|
'double' Name.Attribute
|
|
':' Punctuation
|
|
' ' Text.Whitespace
|
|
'20.0' Literal.Number.Float
|
|
'}' Punctuation
|
|
'\n' Text
|