Skip to content

Commit

Permalink
[FEATURE] Add support for typoscript includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Kott committed Aug 14, 2017
1 parent 7c3686c commit 5196b05
Showing 1 changed file with 104 additions and 1 deletion.
105 changes: 104 additions & 1 deletion syntaxes/typoscript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
{
"include": "#comments"
},
{
"include": "#includes"
},
{
"comment": "Everything after the equal sign",
"begin": "=\\s?",
"begin": "(=)(\\s?)",
"captures": {
"0": {
"name": "keyword.operator"
Expand All @@ -21,6 +24,12 @@
},
{
"include": "#constants"
},
{
"include": "#interpolation"
},
{
"include": "#strings"
}
]
}
Expand Down Expand Up @@ -97,6 +106,100 @@
"match": "(CASE|COA|COA_INT|CONTENT|EDITPANEL|FILE|FILES|FLUIDTEMPLATE|HMENU|TMENU|IMAGE|IMG_RESOURCE|LOAD_REGISTER|RECORDS|RESTORE_REGISTER|SVG|TEMPLATE|TEXT|USER|USER_INT|PAGE)\\b(?:\n|$)"
}
]
},
"interpolation": {
"patterns": [
{
"match": "\\\\[0-7]{1,3}",
"name": "constant.numeric.octal.typoscript"
},
{
"match": "\\\\x[0-9A-Fa-f]{1,2}",
"name": "constant.numeric.hex.typoscript"
},
{
"match": "\\\\[enrt\\\\\\$\\\"]",
"name": "constant.character.escape.typoscript"
}
]
},
"string-double-quoted": {
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.typoscript"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.typoscript"
}
},
"name": "string.quoted.double.typoscript",
"patterns": [
{
"include": "#interpolation"
}
]
},
"string-single-quoted": {
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.typoscript"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.typoscript"
}
},
"name": "string.quoted.single.typoscript",
"patterns": [
{
"match": "\\\\[\\\\']",
"name": "constant.character.escape.typoscript"
}
]
},
"strings": {
"patterns": [
{
"include": "#string-double-quoted"
},
{
"include": "#string-single-quoted"
}
]
},
"includes": {
"patterns": [
{
"begin": "<INCLUDE_TYPOSCRIPT:",
"beginCaptures": {
"0": {
"name": "support.function.typoscript"
}
},
"end": ">",
"endCaptures": {
"0": {
"name": "support.function.typoscript"
}
},
"patterns": [
{
"name": "variable.parameter.typoscript",
"match": "(source|extensions|condition)(=)"
},
{
"include": "#strings"
}
]
}
]
}
},
"scopeName": "source.typoscript"
Expand Down

0 comments on commit 5196b05

Please sign in to comment.