compiler/PPCNotCharSetPredicateNode.st
changeset 438 20598d7ce9fa
parent 422 116d2b2af905
child 452 9f4558b3be66
equal deleted inserted replaced
437:54b3bc9e3987 438:20598d7ce9fa
     8 	poolDictionaries:''
     8 	poolDictionaries:''
     9 	category:'PetitCompiler-Nodes'
     9 	category:'PetitCompiler-Nodes'
    10 !
    10 !
    11 
    11 
    12 
    12 
    13 !PPCNotCharSetPredicateNode methodsFor:'as yet unclassified'!
    13 !PPCNotCharSetPredicateNode methodsFor:'analysis'!
    14 
       
    15 asInlined
       
    16 	^ PPCInlineNotCharSetPredicateNode new
       
    17 		predicate: predicate;
       
    18 		name: name;
       
    19 		yourself
       
    20 !
       
    21 
       
    22 bodyOfPredicate: compiler
       
    23 	| classificationId  classification |
       
    24 	classification := self extendClassification: predicate classification.
       
    25 	classificationId := (compiler idFor: classification prefixed: #classification).
       
    26 	compiler  addConstant: classification as: classificationId.
       
    27 	
       
    28 	compiler addOnLine: '(', classificationId, ' at: context peek asInteger)'.
       
    29 	compiler indent.
       
    30 	compiler add: ' ifTrue: [ self error: '' predicate not expected'' ]'.
       
    31 	compiler add: ' ifFalse: [ nil ].'.
       
    32 	compiler dedent.
       
    33 !
       
    34 
    14 
    35 firstCharSet
    15 firstCharSet
    36 	^ firstCharSet := PPCharSetPredicate on: [:e | (predicate value:e)  not ] 
    16 	^ firstCharSet := PPCharSetPredicate on: [:e | (predicate value:e)  not ] 
    37 	
    17 	
       
    18 ! !
       
    19 
       
    20 !PPCNotCharSetPredicateNode methodsFor:'visiting'!
       
    21 
       
    22 accept: visitor
       
    23 	^ visitor visitNotCharSetPredicateNode: self
    38 ! !
    24 ! !
    39 
    25 
    40 !PPCNotCharSetPredicateNode class methodsFor:'documentation'!
    26 !PPCNotCharSetPredicateNode class methodsFor:'documentation'!
    41 
    27 
    42 version_HG
    28 version_HG