File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,14 @@ A = "aaa ${B} ccc "
228
228
"EMPTY_VAR" : strPtr ("" ),
229
229
},
230
230
},
231
+ {
232
+ "PrefixExport" ,
233
+ `export A = aaa"` ,
234
+ map [string ]* string {
235
+ "A" : strPtr ("aaa" ),
236
+ },
237
+ nil ,
238
+ },
231
239
}
232
240
233
241
for _ , tt := range tests {
@@ -256,7 +264,7 @@ H="my_value"
256
264
257
265
I = bar baz
258
266
259
-
267
+ export EXPORTED_VAR = exported_value
260
268
261
269
J = "foo bar"
262
270
@@ -322,6 +330,7 @@ VAR_DEFAULT_EMPTY = "${EMPTY_VAR:-eee}"
322
330
"VAR_DEFAULT_UNSET" : strPtr ("uuu" ),
323
331
"VAR_DEFAULT_UNSET_OR_EMPTY" : strPtr ("" ),
324
332
"VAR_DEFAULT_EMPTY" : strPtr ("eee" ),
333
+ "EXPORTED_VAR" : strPtr ("exported_value" ),
325
334
}
326
335
327
336
d := dao .NewDefaultDao ()
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ func (l *EnvLangFileListener) ExitEntry(c *fileparser.EntryContext) {
33
33
if id == "" {
34
34
return
35
35
}
36
+
37
+ // TODO: Implement the logic to handle the export keyword in the grammar file
38
+ id , _ = strings .CutPrefix (id , "export " )
39
+ id = strings .TrimSpace (id )
40
+
36
41
hasAssign := true
37
42
if c .ASSIGN () == nil || c .ASSIGN ().GetText () == "" {
38
43
hasAssign = false
You can’t perform that action at this time.
0 commit comments