[plsql] Small improvements, see #2449
This commit is contained in:
@@ -599,21 +599,22 @@ ASTObjectNameDeclaration ObjectNameDeclaration() :
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* See https://docs.oracle.com/en/database/oracle/oracle-database/18/lnpls/formal-parameter-declaration.html#GUID-5BA8E033-96B9-439A-A4FC-4844FEC14AD8
|
||||
*/
|
||||
ASTFormalParameter FormalParameter() :
|
||||
{
|
||||
PLSQLNode simpleNode = null ;
|
||||
}
|
||||
{
|
||||
(
|
||||
simpleNode = ID()
|
||||
// the order of outer "|" is important !
|
||||
simpleNode = ID()
|
||||
[<IN> {jjtThis.setIn(true); } ]
|
||||
[<OUT> {jjtThis.setOut(true); } ]
|
||||
[<NOCOPY> {jjtThis.setNoCopy(true); } ]
|
||||
|
||||
(<IN> {jjtThis.setIn(true); } )?
|
||||
(<OUT> {jjtThis.setOut(true); } )?
|
||||
(<NOCOPY> {jjtThis.setNoCopy(true); } )?
|
||||
|
||||
("..." | Datatype())
|
||||
( (":" "="|<_DEFAULT>) Expression() )?
|
||||
("..." | Datatype())
|
||||
( (":" "="|<_DEFAULT>) Expression() )?
|
||||
)
|
||||
{ jjtThis.setImage(simpleNode.getImage()) ; return jjtThis ; }
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ public class ASTFormalParameter extends net.sourceforge.pmd.lang.plsql.ast.Abstr
|
||||
return this.in;
|
||||
}
|
||||
|
||||
public void setIn(boolean in) {
|
||||
void setIn(boolean in) {
|
||||
this.in = in;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ASTFormalParameter extends net.sourceforge.pmd.lang.plsql.ast.Abstr
|
||||
return this.out;
|
||||
}
|
||||
|
||||
public void setOut(boolean out) {
|
||||
void setOut(boolean out) {
|
||||
this.out = out;
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ public class ASTFormalParameter extends net.sourceforge.pmd.lang.plsql.ast.Abstr
|
||||
return this.nocopy;
|
||||
}
|
||||
|
||||
public void setNoCopy(boolean nocopy) {
|
||||
void setNoCopy(boolean nocopy) {
|
||||
this.nocopy = nocopy;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object jjtAccept(PLSQLParserVisitor visitor, Object data) {
|
||||
return visitor.visit(this, data);
|
||||
|
@@ -1,10 +1,7 @@
|
||||
/**
|
||||
/*
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
/* Generated By:JJTree: Do not edit this line. ASTSqlStatement.java Version 4.3 */
|
||||
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
|
||||
|
||||
package net.sourceforge.pmd.lang.plsql.ast;
|
||||
|
||||
import net.sourceforge.pmd.annotation.InternalApi;
|
||||
@@ -27,7 +24,7 @@ public class ASTSqlStatement extends AbstractPLSQLNode {
|
||||
super(p, id);
|
||||
}
|
||||
|
||||
public void setType(Type type) {
|
||||
void setType(Type type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@@ -35,10 +32,8 @@ public class ASTSqlStatement extends AbstractPLSQLNode {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
/** Accept the visitor. **/
|
||||
@Override
|
||||
public Object jjtAccept(PLSQLParserVisitor visitor, Object data) {
|
||||
return visitor.visit(this, data);
|
||||
}
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=e5c8185ea2733334069ae5313aec7b81 (do not edit this line) */
|
||||
|
Reference in New Issue
Block a user