Skip to content

Commit

Permalink
Fix syntax highlighting for identifiers with numbers or keywords
Browse files Browse the repository at this point in the history
Ref. #1301, eng/recordflux/RecordFlux#1776
  • Loading branch information
treiher committed Sep 3, 2024
1 parent d7efdef commit fd28222
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Generation of uncompilable code for messages with variable as field condition (eng/recordflux/RecordFlux#1762)
- Syntax highlighting for identifiers with numbers or keywords (AdaCore/RecordFlux#1301, eng/recordflux/RecordFlux#1776)

## [0.23.0] - 2024-08-23

Expand Down
10 changes: 5 additions & 5 deletions rflx/ide/vscode/syntax/recordflux.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
},
{
"name": "keyword.other.recordflux",
"match": "\\b(begin|end|with|message|session|package|type|function|is|of|for|use|new|state|transition|exception|generic)"
"match": "\\b(begin|end|with|message|session|package|type|function|is|of|for|use|new|state|transition|exception|generic)\\b"
}
]
},
"operators": {
"name": "entity.name.operator.recordflux",
"match": "=>|=|\\*|\\+|\\-|/=|\\.\\.|<|<=|>|>=|:=|\\b(or|and|range|sequence|'First|'Size|'Last|'Valid_Checksum|'Valid|'Write|'Read)"
"match": "=>|=|\\*|\\+|\\-|/=|\\.\\.|<|<=|>|>=|:=|\\b(or|and|range|sequence|'First|'Size|'Last|'Valid_Checksum|'Valid|'Write|'Read)\\b"
},
"strings": {
"name": "string.quoted.double.recordflux",
Expand All @@ -54,15 +54,15 @@
"patterns": [
{
"name": "constant.language.recordflux",
"match": "\\b(null|Low_Order_First|High_Order_First|Always_Valid|Readable|Writable)"
"match": "\\b(null|Low_Order_First|High_Order_First|Always_Valid|Readable|Writable)\\b"
},
{
"name": "constant.numeric.recordflux",
"match": "\\d[0-9_]*(\\.\\d[0-9_]*)?([eE]([-+])?\\d[0-9_]*)?"
"match": "\\b(\\d[0-9_]*(\\.\\d[0-9_]*)?([eE]([-+])?\\d[0-9_]*)?)\\b"
},
{
"name": "variable.language.recordflux",
"match": "\\b(Size|Byte_Order|Checksum)"
"match": "\\b(Size|Byte_Order|Checksum)\\b"
}
]
},
Expand Down

0 comments on commit fd28222

Please sign in to comment.