Beispiel #1
0
 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]))
Beispiel #2
0
 def voidClassExp(self):
     return (
         Keyword(Keywords.voidKeyword) + Literal('.') +
         Keyword(Keywords.classKeyword)
     ).action(lambda input, begin, end, xs, bindings: Schema.VoidClassExp())
Beispiel #3
0
 def typeClassExp(self):
     return (self.typeExpression() + Literal('.') +
             Keyword(Keywords.classKeyword)
             ).action(lambda input, begin, end, xs, bindings: Schema.
                      TypeClassExp(typeExp=xs[0]))
Beispiel #4
0
 def superExp(self):
     return Keyword(Keywords.superKeyword).action(
         lambda input, begin, end, x, bindings: Schema.SuperExp())
Beispiel #5
0
 def thisExp(self):
     return Keyword(Keywords.thisKeyword).action(
         lambda input, begin, end, x, bindings: Schema.ThisExp())
Beispiel #6
0
 def doubleTypeRef(self):
     return Keyword(Keywords.doubleKeyword).action(
         lambda input, begin, end, x, bindings: Schema.DoubleTypeRef())
Beispiel #7
0
 def floatTypeRef(self):
     return Keyword(Keywords.floatKeyword).action(
         lambda input, begin, end, x, bindings: Schema.FloatTypeRef())
Beispiel #8
0
 def nullLiteral(self):
     return Keyword(Keywords.nullKeyword).action(
         lambda input, begin, end, x, bindings: Schema.NullLiteral())
Beispiel #9
0
 def longTypeRef(self):
     return Keyword(Keywords.longKeyword).action(
         lambda input, begin, end, x, bindings: Schema.LongTypeRef())
Beispiel #10
0
 def intTypeRef(self):
     return Keyword(Keywords.intKeyword).action(
         lambda input, begin, end, x, bindings: Schema.IntTypeRef())
Beispiel #11
0
 def shortTypeRef(self):
     return Keyword(Keywords.shortKeyword).action(
         lambda input, begin, end, x, bindings: Schema.ShortTypeRef())
Beispiel #12
0
 def byteTypeRef(self):
     return Keyword(Keywords.byteKeyword).action(
         lambda input, begin, end, x, bindings: Schema.ByteTypeRef())
Beispiel #13
0
 def booleanTypeRef(self):
     return Keyword(Keywords.booleanKeyword).action(
         lambda input, begin, end, x, bindings: Schema.BooleanTypeRef())
Beispiel #14
0
 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] ) )
Beispiel #15
0
 def charTypeRef(self):
     return Keyword(Keywords.charKeyword).action(
         lambda input, begin, end, x, bindings: Schema.CharTypeRef())
Beispiel #16
0
 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] ) )
Beispiel #17
0
 def booleanLiteral(self):
     return (Keyword(Keywords.falseKeyword) | Keyword(Keywords.trueKeyword)
             ).action(lambda input, begin, end, x, bindings: Schema.
                      BooleanLiteral(value=x))