feat(manual): add strings to midas syntax def

This commit is contained in:
2026-06-30 14:10:32 +02:00
parent e15607b763
commit 6a0401833c

View File

@@ -9,8 +9,10 @@ variables:
identifier: "[a-zA-Z_][a-zA-Z0-9_]*" identifier: "[a-zA-Z_][a-zA-Z0-9_]*"
contexts: contexts:
main: prototype:
- include: comments - include: comments
main:
- include: keywords - include: keywords
- include: types - include: types
@@ -28,6 +30,12 @@ contexts:
- match: \*/ - match: \*/
pop: true pop: true
string:
- meta_include_prototype: false
- meta_scope: string.quoted.double.c
- match: '"'
pop: true
keywords: keywords:
- match: \btype\b - match: \btype\b
scope: keyword.declaration.midas scope: keyword.declaration.midas
@@ -40,7 +48,6 @@ contexts:
push: predicate-stmt push: predicate-stmt
type-stmt: type-stmt:
- include: comments
- match: "{{identifier}}" - match: "{{identifier}}"
scope: entity.name.type scope: entity.name.type
- match: \[ - match: \[
@@ -52,7 +59,6 @@ contexts:
pop: true pop: true
type-expr: type-expr:
- include: comments
- match: \b(fn)\s*(\() - match: \b(fn)\s*(\()
captures: captures:
1: keyword.other.midas 1: keyword.other.midas
@@ -88,7 +94,6 @@ contexts:
set: type-expr set: type-expr
constraint: constraint:
- include: comments
- match: $ - match: $
pop: 2 pop: 2
@@ -98,6 +103,9 @@ contexts:
- match: \b(true|false|none)\b - match: \b(true|false|none)\b
scope: constant.language.midas scope: constant.language.midas
- match: '"'
push: string
- match: (<=|>=|<|>|==|!=|&) - match: (<=|>=|<|>|==|!=|&)
scope: keyword.operator scope: keyword.operator
@@ -111,7 +119,6 @@ contexts:
scope: variable.other.readwrite.midas scope: variable.other.readwrite.midas
type-params: type-params:
- include: comments
- match: "<:" - match: "<:"
scope: keyword.operator.subtype.midas scope: keyword.operator.subtype.midas
- match: "[a-zA-Z][a-zA-Z_0-9]*" - match: "[a-zA-Z][a-zA-Z_0-9]*"
@@ -120,7 +127,6 @@ contexts:
pop: true pop: true
extend-stmt: extend-stmt:
- include: comments
- match: "{{identifier}}" - match: "{{identifier}}"
scope: entity.name.type scope: entity.name.type
- match: \[ - match: \[
@@ -130,7 +136,6 @@ contexts:
set: extend-body set: extend-body
extend-body: extend-body:
- include: comments
- include: member-stmt - include: member-stmt
- match: \} - match: \}
scope: punctuation.section.block.end scope: punctuation.section.block.end
@@ -148,7 +153,6 @@ contexts:
pop: true pop: true
predicate-stmt: predicate-stmt:
- include: comments
- match: "{{identifier}}" - match: "{{identifier}}"
scope: entity.name.function.midas scope: entity.name.function.midas
- match: '\(' - match: '\('