[ https://issues.apache.org/jira/browse/NIFI-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722987#comment-15722987 ]
ASF GitHub Bot commented on NIFI-3149: -------------------------------------- Github user mattyb149 commented on the issue: https://github.com/apache/nifi/pull/1298 +1 LGTM, tried various combinations of +/- and verified the syntax highlighting is supported. Thank you! Merging to master > Expression Language should support passing negative numbers as literals > ----------------------------------------------------------------------- > > Key: NIFI-3149 > URL: https://issues.apache.org/jira/browse/NIFI-3149 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Joseph Percivall > Assignee: Joseph Percivall > Priority: Trivial > > Currently using "${literal(\-5.5):toNumber()" will result in an anltr parsing > exception due to '-' not being handled in the Lexer[1]. > In the ANTLR lexer, "+" and "-" should be added a potential values at the > beginning of a WHOLE_NUMBER or DECIMAL. > A workaround is to place the number in quotes: ${literal("-5.5"):toNumber() > [1] > https://github.com/apache/nifi/blob/master/nifi-commons/nifi-expression-language/src/main/antlr3/org/apache/nifi/attribute/expression/language/antlr/AttributeExpressionLexer.g#L80-L80 -- This message was sent by Atlassian JIRA (v6.3.4#6332)