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 "
228228 "EMPTY_VAR" : strPtr ("" ),
229229 },
230230 },
231+ {
232+ "PrefixExport" ,
233+ `export A = aaa"` ,
234+ map [string ]* string {
235+ "A" : strPtr ("aaa" ),
236+ },
237+ nil ,
238+ },
231239 }
232240
233241 for _ , tt := range tests {
@@ -256,7 +264,7 @@ H="my_value"
256264
257265I = bar baz
258266
259-
267+ export EXPORTED_VAR = exported_value
260268
261269J = "foo bar"
262270
@@ -322,6 +330,7 @@ VAR_DEFAULT_EMPTY = "${EMPTY_VAR:-eee}"
322330 "VAR_DEFAULT_UNSET" : strPtr ("uuu" ),
323331 "VAR_DEFAULT_UNSET_OR_EMPTY" : strPtr ("" ),
324332 "VAR_DEFAULT_EMPTY" : strPtr ("eee" ),
333+ "EXPORTED_VAR" : strPtr ("exported_value" ),
325334 }
326335
327336 d := dao .NewDefaultDao ()
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ func (l *EnvLangFileListener) ExitEntry(c *fileparser.EntryContext) {
3333 if id == "" {
3434 return
3535 }
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+
3641 hasAssign := true
3742 if c .ASSIGN () == nil || c .ASSIGN ().GetText () == "" {
3843 hasAssign = false
You can’t perform that action at this time.
0 commit comments