This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/snippets/systemd/example1.txt
Gabriel Corona 3c7fbf86da
SystemdLexer and DesktopLexer (#2470)
* SystemdLexer and DesktopLexer

* DesktopLexer, parse language tags
2023-07-09 06:25:51 +02:00

77 lines
1.5 KiB
Text

---input---
[Section A]
KeyOne=value 1
KeyTwo=value 2
# a comment
[Section B]
Setting="something" "some thing" "…"
KeyTwo=value 2 \
value 2 continued
[Section C]
KeyThree=value 3\
# this line is ignored
; this line is ignored too
value 3 continued
---tokens---
'[Section A]' Keyword
'\n' Text.Whitespace
'KeyOne' Name.Attribute
'=' Operator
'value 1' Literal.String
'\n' Text.Whitespace
'KeyTwo' Name.Attribute
'=' Operator
'value 2' Literal.String
'\n' Text.Whitespace
'\n' Text.Whitespace
'# a comment' Comment.Single
'\n' Text.Whitespace
'\n' Text.Whitespace
'[Section B]' Keyword
'\n' Text.Whitespace
'Setting' Name.Attribute
'=' Operator
'"something" "some thing" "…"' Literal.String
'\n' Text.Whitespace
'KeyTwo' Name.Attribute
'=' Operator
'value 2 ' Literal.String
'\\' Text
'\n' Text.Whitespace
' ' Text.Whitespace
'value 2 continued' Literal.String
'\n' Text.Whitespace
'\n' Text.Whitespace
'[Section C]' Keyword
'\n' Text.Whitespace
'KeyThree' Name.Attribute
'=' Operator
'value 3' Literal.String
'\\' Text
'\n' Text.Whitespace
'# this line is ignored' Comment.Single
'\n' Text.Whitespace
'; this line is ignored too' Comment.Single
'\n' Text.Whitespace
' ' Text.Whitespace
'value 3 continued' Literal.String
'\n' Text.Whitespace