[ 
https://issues.apache.org/jira/browse/METRON-693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115570#comment-16115570
 ] 

Otto Fowler edited comment on METRON-693 at 8/6/17 1:30 AM:
------------------------------------------------------------

A couple of problems here
* There is no complete way to get all the namespace reserve words at runtime 
right now, without hard coding the lists.  Unless we come up with a generation 
scheme. (Functions, keywords, operators)
* We don't actually send the L value to Stellar for evaluation,  Stellar 
doesn't have Assignment.  So we don't get any errors.
* Do we want to have a 'lookup' and do it outside of execution? or do We want 
to change how we call Stellar so that it does the work for us?

As noted, we don't do assignment, but if we did having stellar evaluate:

Foo = "x"   to return X  would do it I *think*

 


was (Author: ottobackwards):
A couple of problems here
* There is no complete way to get all the namespace reserve words at runtime 
right now, without hard coding the lists.  Unless we come up with a generation 
scheme.
* We don't actually send the L value to Stellar for evaluation,  Stellar 
doesn't have Assignment.  So we don't get any errors.
* Do we want to have a 'lookup' and do it outside of execution? or do We want 
to change how we call Stellar so that it does the work for us?

As noted, we don't do assignment, but if we did having stellar evaluate:

Foo = "x"   to return X  would do it I *think*

 

> Stellar REPL lets reserved tokens be used as unusable variable names
> --------------------------------------------------------------------
>
>                 Key: METRON-693
>                 URL: https://issues.apache.org/jira/browse/METRON-693
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Justin Leet
>            Assignee: Justin Leet
>            Priority: Minor
>
> Reserved tokens like '=' can be assigned with the variable assignment 
> operator.  These "variables" can no longer be used, but show up in the %vars 
> command.  Reserved tokens should be disallowed.
> Example
> {code}
> [Stellar]>>> test := 1
> [Stellar]>>> 2 + 2 := 5
> [Stellar]>>> = := 6
> [Stellar]>>> %vars
> 2 + 2 = 5 via 5
> test = 1 via 1
> = = 6 via 6
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to