diff -r d716a8181fc1 -r 97090c2baa33 compiler/TTypechecker.st --- a/compiler/TTypechecker.st Fri Sep 18 06:20:53 2015 +0100 +++ b/compiler/TTypechecker.st Sun Sep 20 12:01:42 2015 +0100 @@ -9,6 +9,19 @@ category:'Languages-Tea-Compiler-Internals' ! +!TTypechecker methodsFor:'visiting'! + +visitArgument: anRBVariableNode + | binding | + + + super visitArgument: anRBVariableNode. + binding := anRBVariableNode binding. + binding type: (anRBVariableNode typeSpec asType) + + "Created: / 20-09-2015 / 07:19:27 / Jan Vrany " +! ! + !TTypechecker methodsFor:'visitor-double dispatching'! acceptIfTrueIfFalseNode: node @@ -38,6 +51,24 @@ "Created: / 14-09-2015 / 14:18:28 / Jan Vrany " ! +acceptLiteralNode: aLiteralNode + | binding value | + + binding := aLiteralNode binding. + value := binding value. + value isInteger ifTrue:[ + binding type: (context environment binding lookupClassSIntegerW) type. + ^ self + ]. + value isBoolean ifTrue:[ + binding type: (context environment binding lookupClassBoolean) type. + ^ self. + ]. + context reportTypeError: 'Unsupported constant type'. + + "Created: / 20-09-2015 / 07:13:45 / Jan Vrany " +! + acceptMessageNode: aMessageNode | receiverType receiverBinding methodBinding |