2016-07-27 15:16 GMT+02:00 Yuriy Tymchuk <[email protected]>: > Hi, I have two questions about semantic analysis. > > I’m working with expressions a lot now. And I want to highlight them, but > I don’t want to pay attention for undeclared variables. So in terms of > analysis it would be nice to know global variables, but I don’t care about > having marked others as undeclared. > > Second thing is more of a disturbing functionality. If you have `ast` > variable which is an RBPatternVariableNode and you do `ast > doSemanticAnalysis` after that ast may end up being a RBVariableNode. I > find this annoying because I don’t expect my object to change just because > of an analysis. >
But it is the same that happens with any global variable. After parsing an expression like RBPatternParser parseExpression:'Morph draw:`arg' Morph is just a RBVariableNode and you need to call #doSemanticAnalysis to get a RBGlobalNode instead. But I guess #doSemanticAnalysis is just not supposed to work with pattern nodes. > > Uko >
