2023-03-23 22:40:11 +00:00
|
|
|
%YAML 1.2
|
|
|
|
|
---
|
|
|
|
|
name: Apfl
|
|
|
|
|
|
|
|
|
|
file_extensions: ["apfl"]
|
|
|
|
|
|
|
|
|
|
scope: source.apfl
|
|
|
|
|
|
|
|
|
|
contexts:
|
|
|
|
|
main:
|
2023-11-07 20:40:02 +00:00
|
|
|
- match: '`'
|
|
|
|
|
push: backtick_string
|
2023-03-23 22:40:11 +00:00
|
|
|
- match: '"'
|
|
|
|
|
push: string
|
|
|
|
|
- match: "#.*$"
|
|
|
|
|
scope: comment.line.number-sign.apfl
|
|
|
|
|
- match: "-?[0-9][0-9]*(\\.[0-9]+)?"
|
|
|
|
|
scope: constant.numeric.value.apfl
|
|
|
|
|
- match: "\\b(if|while|k?each|for|loop)\\b"
|
|
|
|
|
scope: keyword.control.apfl
|
|
|
|
|
- match: "\\b(true|false)\\b"
|
|
|
|
|
scope: constant.language.boolean.apfl
|
|
|
|
|
- match: "\\b(nil)\\b"
|
|
|
|
|
scope: constant.language.null.apfl
|
|
|
|
|
- match: "((?:-[^>0-9]|[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"a-zA-Z0-9]=[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"a-zA-Z0-9]*|[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"=])+)\\s*:?=\\s*\\{"
|
|
|
|
|
captures:
|
|
|
|
|
1: entity.name.function.apfl
|
|
|
|
|
- match: "(-[^>0-9]|[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"a-zA-Z0-9]=[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"a-zA-Z0-9]*|[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"=])+"
|
|
|
|
|
scope: meta.generic-name.apfl
|
|
|
|
|
- match: "'(-[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\">0-9]|[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"a-zA-Z0-9]=[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"a-zA-Z0-9]*|[^\\s()\\[\\]\\{\\}~\\.@;\\\\,?'#:\"=])+"
|
|
|
|
|
scope: string.apfl
|
|
|
|
|
string:
|
|
|
|
|
- meta_scope: string.quoted.double.apfl
|
|
|
|
|
- match: "\\\\[xX][0-9a-fA-F]{2}"
|
|
|
|
|
scope: constant.character.escape.apfl
|
|
|
|
|
- match: \\.
|
|
|
|
|
scope: constant.character.escape.apfl
|
|
|
|
|
- match: '"'
|
|
|
|
|
pop: true
|
2023-11-07 20:40:02 +00:00
|
|
|
backtick_string:
|
|
|
|
|
- meta_scope: string.quoted.backtick.apfl
|
|
|
|
|
- match: "``"
|
|
|
|
|
scope: constant.character.escape.apfl
|
|
|
|
|
- match: '`(?!`)'
|
|
|
|
|
pop: true
|