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

ASF GitHub Bot commented on METRON-873:
---------------------------------------

Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/542#discussion_r112856583
  
    --- Diff: 
metron-platform/metron-common/src/main/java/org/apache/metron/common/stellar/StellarCompiler.java
 ---
    @@ -263,7 +263,56 @@ public void exitVariable(StellarParser.VariableContext 
ctx) {
     
       @Override
       public void exitStringLiteral(StellarParser.StringLiteralContext ctx) {
    -    expression.tokenDeque.push(new Token<>(ctx.getText().substring(1, 
ctx.getText().length() - 1), String.class));
    +    String rawToken = ctx.getText();
    +    String literal = unquoteLiteral(rawToken);
    +
    +    expression.tokenDeque.push(new Token<>(literal, String.class));
    +  }
    +
    --- End diff --
    
    While I don't see a problem with this code, it does make me wonder if we 
are re-inventing the wheel here.  Isn't there some standard lib for doing this?


> Stellar string literals do not support quote escaping
> -----------------------------------------------------
>
>                 Key: METRON-873
>                 URL: https://issues.apache.org/jira/browse/METRON-873
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Casey Stella
>
> Right now, in stellar, we cannot represent a string literal that contains 
> 'foo' if the string is quoted with ' or "foo" if the string is quoted with ". 
>  This is unfortunate and should be corrected.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to