// Semantic resolution public override void ResolveStatement(ISemanticResolver s) { // Label must have not been defined. m_symbol = (LabelEntry) s.LookupSymbol(s.GetCurrentContext(), m_label, false); if (m_symbol != null) { // Error, label already defined. ThrowError(SymbolError.LabelAlreadyDefined(m_label.Text, m_label.Location, m_symbol.Node.LabelId.Location)); /* s.ThrowError(SymbolEngine.SemanticChecker.Code.cLabelAlreadyDefined, m_label.Location, "Label '" + m_label.Text + "' is already defined at '"+ m_symbol.Node.LabelId.Location + "' in the current scope"); */ } m_symbol = new LabelEntry(m_label.Text, this); s.GetCurrentContext().AddSymbol(m_symbol); }