Fixed scope, removed it from parser and put it completely in semantic analysis.