summaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser')
-rw-r--r--src/parser/grammar.pegjs6
-rw-r--r--src/parser/index.ts5
-rw-r--r--src/parser/parser.ts15
3 files changed, 12 insertions, 14 deletions
diff --git a/src/parser/grammar.pegjs b/src/parser/grammar.pegjs
index 180b87f..0017b18 100644
--- a/src/parser/grammar.pegjs
+++ b/src/parser/grammar.pegjs
@@ -172,13 +172,13 @@ PrimitiveOperationExpression
RecordExpressionTuple
= LPAREN
_?
- variable:VarStatement
+ value:Value
_?
COMMA
_?
offset:OffsetStatement
_?
- RPAREN { return { variable, offset }; }
+ RPAREN { return { value, offset }; }
RecordExpressionTupleList
= LBRACKET
@@ -202,7 +202,7 @@ RecordExpression
_?
COMMA
_?
- address:Literal
+ address:Identifier
_?
COMMA
_?
diff --git a/src/parser/index.ts b/src/parser/index.ts
index 366042c..912e6f2 100644
--- a/src/parser/index.ts
+++ b/src/parser/index.ts
@@ -2,5 +2,6 @@ export * from './generate';
export * from './parser';
import * as peggy from './parser';
-export const peggyParse = (source: string): peggy.ContinuationExpression[] =>
- peggy.parse(source);
+export const peggyParse = (source: string): peggy.ContinuationExpression[] => {
+ return peggy.parse(source);
+};
diff --git a/src/parser/parser.ts b/src/parser/parser.ts
index 934f3ff..b73df78 100644
--- a/src/parser/parser.ts
+++ b/src/parser/parser.ts
@@ -473,8 +473,8 @@ function peg$parse(input, options) {
};
};// @ts-ignore
- var peg$f11 = function(variable, offset) {// @ts-ignore
- return { variable, offset }; };// @ts-ignore
+ var peg$f11 = function(value, offset) {// @ts-ignore
+ return { value, offset }; };// @ts-ignore
var peg$f12 = function(records, lastRecord) {
// @ts-ignore
@@ -2588,7 +2588,7 @@ peg$parseRecordExpressionTuple() {
s2 = null;
}
// @ts-ignore
- s3 = peg$parseVarStatement();
+ s3 = peg$parseValue();
// @ts-ignore
if (s3 !== peg$FAILED) {
// @ts-ignore
@@ -2879,7 +2879,7 @@ peg$parseRecordExpression() {
s8 = null;
}
// @ts-ignore
- s9 = peg$parseLiteral();
+ s9 = peg$parseIdentifier();
// @ts-ignore
if (s9 !== peg$FAILED) {
// @ts-ignore
@@ -5372,15 +5372,12 @@ export type PrimitiveOperationExpression = {
continuations: ContinuationList;
};
};
-export type RecordExpressionTuple = {
- variable: VarStatement;
- offset: OffsetStatement;
-};
+export type RecordExpressionTuple = { value: Value; offset: OffsetStatement };
export type RecordExpressionTupleList = any[];
export type RecordExpression = {
record: {
records: RecordExpressionTupleList;
- address: Literal;
+ address: Identifier;
body: ContinuationExpression;
};
};