Skip to content

Commit

Permalink
add remaining corerel rules and highlight specialized literals
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaSBCrea committed Apr 28, 2024
1 parent 7599d31 commit 113f563
Show file tree
Hide file tree
Showing 11 changed files with 377 additions and 145 deletions.
30 changes: 17 additions & 13 deletions dist/index.cjs

Large diffs are not rendered by default.

47 changes: 25 additions & 22 deletions dist/index.cjs.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { LRLanguage, LanguageSupport } from "@codemirror/language";
declare namespace relTerms {
const RawStringSequence: 1;
const spaces: 164;
const newLine: 165;
const spaces: 168;
const newLine: 169;
const LineComment: 2;
const BlockComment: 3;
const Rel: 4;
Expand Down Expand Up @@ -41,26 +41,29 @@ declare namespace relTerms {
const InterpolationId: 65;
const InterpolationExpression: 66;
const BasicExpression: 67;
const PartialApplicationExpression: 68;
const V1NocommaActual: 69;
const V1Bindings: 72;
const V1BasicActual: 73;
const ApplicationExpression: 74;
const BoundedExpression: 115;
const V1LogicalAbstractExpression: 117;
const V1AbstractExpression: 131;
const InterpolationMultilineLiteral: 132;
const BoundDeclaration: 135;
const DeclareBoundDeclaration: 136;
const ValueTypeDeclaration: 139;
const EntityTypeDeclaration: 140;
const ConstraintDeclaration: 141;
const ModuleDeclaration: 142;
const WithUseDeclaration: 143;
const Alias: 145;
const AliasId: 146;
const ImportDeclaration: 147;
const NamespaceDeclaration: 149;
const CurlyOpId: 68;
const SpecializeExpression: 69;
const PartialApplicationExpression: 70;
const V1NocommaActual: 71;
const V1Bindings: 74;
const V1BasicActual: 75;
const ApplicationExpression: 76;
const BoundedExpression: 117;
const V1LogicalAbstractExpression: 119;
const V1AbstractExpression: 133;
const InterpolationMultilineLiteral: 134;
const BoundDeclaration: 137;
const DeclareBoundDeclaration: 138;
const ValueTypeDeclaration: 141;
const EntityTypeDeclaration: 142;
const ConstraintDeclaration: 143;
const ModuleDeclaration: 144;
const WithUseDeclaration: 145;
const Alias: 147;
const AliasId: 148;
const ImportDeclaration: 149;
const ImportAlias: 151;
const NamespaceDeclaration: 152;
}
declare const relLanguage: LRLanguage;
declare function rel(): LanguageSupport;
Expand Down
47 changes: 25 additions & 22 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { LRLanguage, LanguageSupport } from "@codemirror/language";
declare namespace relTerms {
const RawStringSequence: 1;
const spaces: 164;
const newLine: 165;
const spaces: 168;
const newLine: 169;
const LineComment: 2;
const BlockComment: 3;
const Rel: 4;
Expand Down Expand Up @@ -41,26 +41,29 @@ declare namespace relTerms {
const InterpolationId: 65;
const InterpolationExpression: 66;
const BasicExpression: 67;
const PartialApplicationExpression: 68;
const V1NocommaActual: 69;
const V1Bindings: 72;
const V1BasicActual: 73;
const ApplicationExpression: 74;
const BoundedExpression: 115;
const V1LogicalAbstractExpression: 117;
const V1AbstractExpression: 131;
const InterpolationMultilineLiteral: 132;
const BoundDeclaration: 135;
const DeclareBoundDeclaration: 136;
const ValueTypeDeclaration: 139;
const EntityTypeDeclaration: 140;
const ConstraintDeclaration: 141;
const ModuleDeclaration: 142;
const WithUseDeclaration: 143;
const Alias: 145;
const AliasId: 146;
const ImportDeclaration: 147;
const NamespaceDeclaration: 149;
const CurlyOpId: 68;
const SpecializeExpression: 69;
const PartialApplicationExpression: 70;
const V1NocommaActual: 71;
const V1Bindings: 74;
const V1BasicActual: 75;
const ApplicationExpression: 76;
const BoundedExpression: 117;
const V1LogicalAbstractExpression: 119;
const V1AbstractExpression: 133;
const InterpolationMultilineLiteral: 134;
const BoundDeclaration: 137;
const DeclareBoundDeclaration: 138;
const ValueTypeDeclaration: 141;
const EntityTypeDeclaration: 142;
const ConstraintDeclaration: 143;
const ModuleDeclaration: 144;
const WithUseDeclaration: 145;
const Alias: 147;
const AliasId: 148;
const ImportDeclaration: 149;
const ImportAlias: 151;
const NamespaceDeclaration: 152;
}
declare const relLanguage: LRLanguage;
declare function rel(): LanguageSupport;
Expand Down
30 changes: 17 additions & 13 deletions dist/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const relLanguage = LRLanguage.define({
"VarDecl/BasicId": tags.attributeName,
"InterpolationId AliasId/BasicId": tags.labelName,
"QualifiedNameElem RelnameLiteral RelnameStringLiteral RelnameMultilineStringLiteral ValueTypeLiteral": tags.literal,
"SpecializeIntLiteral SpecializeExpression": tags.literal,
"DateLiteral DateTimeLiteral": tags.string,
"Operator OperatorKeyword": tags.operatorKeyword,
'( )': tags.paren,
Expand Down
24 changes: 12 additions & 12 deletions src/parser.js

Large diffs are not rendered by default.

47 changes: 25 additions & 22 deletions src/parser.terms.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file was generated by lezer-generator. You probably shouldn't edit it.
export const
RawStringSequence = 1,
spaces = 164,
newLine = 165,
spaces = 168,
newLine = 169,
LineComment = 2,
BlockComment = 3,
Rel = 4,
Expand Down Expand Up @@ -41,23 +41,26 @@ export const
InterpolationId = 65,
InterpolationExpression = 66,
BasicExpression = 67,
PartialApplicationExpression = 68,
V1NocommaActual = 69,
V1Bindings = 72,
V1BasicActual = 73,
ApplicationExpression = 74,
BoundedExpression = 115,
V1LogicalAbstractExpression = 117,
V1AbstractExpression = 131,
InterpolationMultilineLiteral = 132,
BoundDeclaration = 135,
DeclareBoundDeclaration = 136,
ValueTypeDeclaration = 139,
EntityTypeDeclaration = 140,
ConstraintDeclaration = 141,
ModuleDeclaration = 142,
WithUseDeclaration = 143,
Alias = 145,
AliasId = 146,
ImportDeclaration = 147,
NamespaceDeclaration = 149
CurlyOpId = 68,
SpecializeExpression = 69,
PartialApplicationExpression = 70,
V1NocommaActual = 71,
V1Bindings = 74,
V1BasicActual = 75,
ApplicationExpression = 76,
BoundedExpression = 117,
V1LogicalAbstractExpression = 119,
V1AbstractExpression = 133,
InterpolationMultilineLiteral = 134,
BoundDeclaration = 137,
DeclareBoundDeclaration = 138,
ValueTypeDeclaration = 141,
EntityTypeDeclaration = 142,
ConstraintDeclaration = 143,
ModuleDeclaration = 144,
WithUseDeclaration = 145,
Alias = 147,
AliasId = 148,
ImportDeclaration = 149,
ImportAlias = 151,
NamespaceDeclaration = 152
Loading

0 comments on commit 113f563

Please sign in to comment.