Add custom environment variable via ScriptOptions

+ Fix #145
Yeah, that's why I went for two different sections of quotables in the
grammar I mocked up. What a rabbit hole.

I'm going to be out and about, so I won't be able to come back to this
until the weekend at the earliest. Hopefully we'll figure something good
out.

On Wednesday, June 25, 2014, Erran Carey <notifications@github.com> wrote:

> In lib/env-vars.jison:
>
> > +        {$$ = $1+", "+$3;}
> > +    | pair SEMICOLON EOF
> > +        {$$ = $1;}
> > +    | pair EOF
> > +        {$$ = $1;}
> > +    ;
> > +
> > +pair
> > +    : VALID_VARIABLE_NAME '=' QUOTED_STRING
> > +        {$$ = "{ "+"\""+$1+"\""+": "+"\""+$3+"\""+" }";}
> > +    | VALID_VARIABLE_NAME '=' VALID_VARIABLE_NAME
> > +        {$$ = "{ "+"\""+$1+"\""+": "+"\""+$3+"\""+" }";}
> > +    ;
> > +
> > +QUOTED_STRING
> > +    : SINGLE_QUOTE VALID_VARIABLE_NAME SINGLE_QUOTE
>
> Definitely. Using VALID_VARIABLE_NAME vs. catching a "wildcard" (exc.
> quotes) token is a temporary work around for the issue I was seeing
> evaluating the grammar. When I added a proper wildcard token it would
> collide with the VALID_VARIABLE_NAME and partial matches would occur on
> that. If I made the wildcard token higher precedence it would begin to each
> captures of VALID_VARIABLE_NAME. I'll probably get to trying to update
> the grammar this weekend myself. I seen similar issues with escaped quotes,
> though I remember having a bit more success with them.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/rgbkrk/atom-script/pull/147/files#r14225102>.
>