compiler/PPCNilNode.st
changeset 438 20598d7ce9fa
parent 422 116d2b2af905
child 452 9f4558b3be66
equal deleted inserted replaced
437:54b3bc9e3987 438:20598d7ce9fa
     7 	classVariableNames:''
     7 	classVariableNames:''
     8 	poolDictionaries:''
     8 	poolDictionaries:''
     9 	category:'PetitCompiler-Nodes'
     9 	category:'PetitCompiler-Nodes'
    10 !
    10 !
    11 
    11 
    12 !PPCNilNode methodsFor:'analyzing'!
    12 !PPCNilNode methodsFor:'accessing'!
    13 
    13 
    14 isNullable
    14 prefix
    15 	^ true
    15 	^ #nil
    16 ! !
    16 ! !
    17 
    17 
    18 !PPCNilNode methodsFor:'as yet unclassified'!
    18 !PPCNilNode methodsFor:'analysis'!
    19 
    19 
    20 acceptsEpsilon
    20 acceptsEpsilon
    21 	^ true
    21 	^ true
    22 !
       
    23 
       
    24 asInlined
       
    25 	^ PPCInlineNilNode new
       
    26 !
       
    27 
       
    28 compileWith: compiler effect: effect id: id
       
    29 	compiler startMethod: id.
       
    30 	compiler add: '^ nil.'.
       
    31  ^ compiler stopMethod.
       
    32 !
    22 !
    33 
    23 
    34 firstCharSet
    24 firstCharSet
    35 	^ PPCharSetPredicate on: [:e | false ] 
    25 	^ PPCharSetPredicate on: [:e | false ] 
    36 !
    26 !
    37 
    27 
    38 prefix
    28 isNullable
    39 	^ #nil
    29 	^ true
    40 ! !
    30 ! !
    41 
    31 
       
    32 !PPCNilNode methodsFor:'visiting'!
       
    33 
       
    34 accept: visitor
       
    35 	^ visitor visitNilNode: self
       
    36 ! !
       
    37