Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit 1e2dfda

Browse files
committed
Allow comments in DSL
1 parent 0ddb06a commit 1e2dfda

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const client = new ApolloClient({
3434
uri:
3535
'https://k4emdgbstjgufjmo75arzjoxti.appsync-api.us-east-1.amazonaws.com/graphql',
3636
headers: {
37-
'x-api-key': 'da2-3pw46cpomrgtnkzjmonjiec47i',
37+
'x-api-key': 'da2-duqi25zzb5aqrm7wv4lkgun3du',
3838
},
3939
})
4040

src/grammar/schemeGrammar.js

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ const RefDf = createToken({name: 'RefDefinition', pattern: /REF[ ]*:/i})
77

88
const lBraket = createToken({name: 'lBraket', pattern: /[ ]*{[ ]*/})
99
const rBraket = createToken({name: 'RBraket', pattern: /[ ]*}[ ]*/})
10+
const commentLine = createToken({
11+
name: 'CLine',
12+
pattern: /[ ]*\/\/.*\n/,
13+
group: Lexer.SKIPPED,
14+
})
15+
const comment = createToken({
16+
name: 'Comment',
17+
pattern: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//,
18+
group: Lexer.SKIPPED,
19+
})
1020

1121
const lKey = createToken({name: 'lKey', pattern: /\[/})
1222
const rKey = createToken({name: 'rKey', pattern: /\]/})
@@ -28,6 +38,8 @@ const WS = createToken({
2838
})
2939

3040
const allTokens = [
41+
commentLine,
42+
comment,
3143
tableDf,
3244
RefDf,
3345
EnumDf,

0 commit comments

Comments
 (0)