def genericWildcardArgument(self): return (Literal('?') + (Keyword(Keywords.superKeyword) | Keyword(Keywords.extendsKeyword)) + self.referenceTypeExp() ).action(lambda input, begin, end, x, bindings: Schema. WildCardTypeArgument(extendsOrSuper=('extends' if x[ 1] == Keywords.extendsKeyword else 'super'), typeExp=x[2]))
def voidClassExp(self): return ( Keyword(Keywords.voidKeyword) + Literal('.') + Keyword(Keywords.classKeyword) ).action(lambda input, begin, end, xs, bindings: Schema.VoidClassExp())
def typeClassExp(self): return (self.typeExpression() + Literal('.') + Keyword(Keywords.classKeyword) ).action(lambda input, begin, end, xs, bindings: Schema. TypeClassExp(typeExp=xs[0]))
def superExp(self): return Keyword(Keywords.superKeyword).action( lambda input, begin, end, x, bindings: Schema.SuperExp())
def thisExp(self): return Keyword(Keywords.thisKeyword).action( lambda input, begin, end, x, bindings: Schema.ThisExp())
def doubleTypeRef(self): return Keyword(Keywords.doubleKeyword).action( lambda input, begin, end, x, bindings: Schema.DoubleTypeRef())
def floatTypeRef(self): return Keyword(Keywords.floatKeyword).action( lambda input, begin, end, x, bindings: Schema.FloatTypeRef())
def nullLiteral(self): return Keyword(Keywords.nullKeyword).action( lambda input, begin, end, x, bindings: Schema.NullLiteral())
def longTypeRef(self): return Keyword(Keywords.longKeyword).action( lambda input, begin, end, x, bindings: Schema.LongTypeRef())
def intTypeRef(self): return Keyword(Keywords.intKeyword).action( lambda input, begin, end, x, bindings: Schema.IntTypeRef())
def shortTypeRef(self): return Keyword(Keywords.shortKeyword).action( lambda input, begin, end, x, bindings: Schema.ShortTypeRef())
def byteTypeRef(self): return Keyword(Keywords.byteKeyword).action( lambda input, begin, end, x, bindings: Schema.ByteTypeRef())
def booleanTypeRef(self): return Keyword(Keywords.booleanKeyword).action( lambda input, begin, end, x, bindings: Schema.BooleanTypeRef())
def classInstanceCreationExpression(self): return ( Keyword( Keywords.newKeyword ) + self.classOrInterfaceTypeRef() + Literal( '(' ) + SeparatedList( self.expression(), 0, -1, SeparatedList.TrailingSeparatorPolicy.NEVER ) + Literal( ')' ) ).action( \ lambda input, begin, end, xs, bindings: Schema.ClassInstanceCreation( classTypeRef=xs[1], args=xs[3] ) )
def charTypeRef(self): return Keyword(Keywords.charKeyword).action( lambda input, begin, end, x, bindings: Schema.CharTypeRef())
def arrayCreationExpression(self): return ( Keyword( Keywords.newKeyword ) + ( self.classOrInterfaceTypeRef() | self.primitiveTypeRef() ) + self.dimExpr().oneOrMore() ).action( \ lambda input, begin, end, xs, bindings: Schema.ClassInstanceCreation( classTypeRef=xs[1], args=xs[3] ) )
def booleanLiteral(self): return (Keyword(Keywords.falseKeyword) | Keyword(Keywords.trueKeyword) ).action(lambda input, begin, end, x, bindings: Schema. BooleanLiteral(value=x))