public ErrorEvent(SourcePosition position, string description, int code) { IsError = true; this.Position = position; this.Description = description; this.Code = code; }
public SourcePosition GetSourcePosition() { var pos = new SourcePosition(); pos.Position = currCharIndex; pos.TokenLength = GetForwardToken().Attribute.Length; return pos; }
public void DispatchError(SourcePosition position, string description, int code = 1) { ErrorEventHandler handler = Error; if (handler != null) { handler(this, new ErrorEvent(position, description, code)); } }
public void DispatchWarning(SourcePosition position, string description) { ErrorEventHandler handler = Error; if (handler != null) { var e = new ErrorEvent(position, description, 0); e.IsError = false; handler(this, e); } }
public void SetTextPosition(SourcePosition pos) { TextPosition = pos; }
private void PushNode(AstNode node) { node.SetTextPosition(tokenCurrPosition); nodes.Push(node); tokenCurrPosition = null; }
public void SetSoursePosition(SourcePosition position) { tokenCurrPosition = position; }
protected void DispatchError(SourcePosition position, string description, int code = -1) { result = false; ErrorDispatcher.DispatchError(position, description, code); }
protected void DispatchError(SourcePosition position, string description, int code) { ErrorDispatcher.DispatchError(position, description, code); }