forked from phoedos/pmd
fixed parsing front slash
This commit is contained in:
@@ -3191,7 +3191,7 @@ ASTMultiplicativeExpression MultiplicativeExpression() #MultiplicativeExpression
|
||||
//UnaryExpression() ( ( "*" | "/" | <MOD> ) UnaryExpression() )*
|
||||
(
|
||||
(simpleNode = UnaryExpression(true) ) { sb.append(simpleNode.getImage()); }
|
||||
( LOOKAHEAD(2)
|
||||
( LOOKAHEAD("**" | "*" | "/" | <MOD> , {getToken(1).specialToken == null || getToken(1).specialToken.kind != EOL})
|
||||
( ("**" ) { sb.append(" ** "); } //Exponentiation
|
||||
| ("*" ) { sb.append(" * "); }
|
||||
| ("/" ) { sb.append(" / "); }
|
||||
|
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.plsql.ast;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import net.sourceforge.pmd.lang.plsql.AbstractPLSQLParserTst;
|
||||
|
||||
public class SlashAsDivisionTest extends AbstractPLSQLParserTst {
|
||||
|
||||
@Test
|
||||
public void parseSlashAsDivision() {
|
||||
plsql.parseResource("SlashAsDivision.sql");
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
update name
|
||||
set street = 'Main Street'
|
||||
/
|
||||
|
||||
update name
|
||||
set n01 = 2/2
|
||||
/
|
Reference in New Issue
Block a user