Feat: add mutable pointer type *mut T and *mut opaque
- Grammar: update pointer_type to support optional mut keyword; LL(1) verified (56 named rules, no conflicts) - AST: update Type enum with mutable: bool field for Pointer and OpaquePointer variants - Parser: consume optional mut token in parse_type; update all existing pointer tests; add 4 new mut pointer tests (85 pass) - VSCode extension: add *mut capture-group pattern for syntax highlighting; update SYNTAX.md with pointer mutability table Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -180,6 +180,14 @@
|
||||
"name": "keyword.operator.assignment.flux",
|
||||
"match": "(?<![=!<>+\\-*/%&|^])=(?!=)"
|
||||
},
|
||||
{
|
||||
"comment": "Mutable pointer type prefix *mut — must precede arithmetic *",
|
||||
"match": "(\\*)(mut)\\b",
|
||||
"captures": {
|
||||
"1": { "name": "keyword.operator.type.pointer.flux" },
|
||||
"2": { "name": "storage.modifier.mut.flux" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"comment": "Arithmetic: + - * / %",
|
||||
"name": "keyword.operator.arithmetic.flux",
|
||||
|
||||
Reference in New Issue
Block a user