private DomRegion GetRegion(AST.Node m) { AST.LexicalInfo l = m.LexicalInfo; if (l.Line < 0) { return(DomRegion.Empty); } else { return(new DomRegion(l.Line, 0 /*l.Column*/, l.Line, GetLineEnd(l.Line))); } }
B.LexicalInfo GetLexicalInfo(INode node) { if (node == null) return new B.LexicalInfo(fileName); Location point = node.StartLocation; if (!point.IsEmpty) { lastLexicalInfo = new B.LexicalInfo(fileName, point.Y, point.X); } if (lastLexicalInfo == null) { lastLexicalInfo = new B.LexicalInfo(fileName); } return lastLexicalInfo; }
private DomRegion GetClientRegion(AST.Node m) { AST.LexicalInfo l = m.LexicalInfo; if (l.Line < 0) { return(DomRegion.Empty); } AST.SourceLocation l2; if (m is AST.Method) { l2 = ((AST.Method)m).Body.EndSourceLocation; } else if (m is AST.Property) { AST.Property p = (AST.Property)m; if (p.Getter != null && p.Getter.Body != null) { l2 = p.Getter.Body.EndSourceLocation; if (p.Setter != null && p.Setter.Body != null) { if (p.Setter.Body.EndSourceLocation.Line > l2.Line) { l2 = p.Setter.Body.EndSourceLocation; } } } else if (p.Setter != null && p.Setter.Body != null) { l2 = p.Setter.Body.EndSourceLocation; } else { l2 = p.EndSourceLocation; } } else { l2 = m.EndSourceLocation; } if (l2 == null || l2.Line < 0 || l.Line == l2.Line) { return(DomRegion.Empty); } // TODO: use l.Column / l2.Column when the tab-bug has been fixed return(new DomRegion(l.Line, GetLineEnd(l.Line), l2.Line, GetLineEnd(l2.Line))); }
B.LexicalInfo GetLexicalInfo(INode node) { if (node == null) { return(new B.LexicalInfo(fileName)); } Location point = node.StartLocation; if (!point.IsEmpty) { lastLexicalInfo = new B.LexicalInfo(fileName, point.Y, point.X); } if (lastLexicalInfo == null) { lastLexicalInfo = new B.LexicalInfo(fileName); } return(lastLexicalInfo); }
public GenericParameterDeclaration(LexicalInfo lexicalInfo) : base(lexicalInfo) { }
public ExceptionHandler(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
public RaiseStatement(LexicalInfo li, Expression exception, StatementModifier modifier) : base(li, exception) { this.Modifier = modifier; }
public ReturnStatement(LexicalInfo li, Expression expression, StatementModifier modifier) : base(li) { this.Expression = expression; this.Modifier = modifier; }
public ExtendedGeneratorExpression(LexicalInfo lexicalInfo) : base(lexicalInfo) { }
public TryCastExpression(LexicalInfo lexicalInfo) : base(lexicalInfo) { }
public TypeReference(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
public ClassDefinition(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
protected TypeDefinition(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
public Slice(LexicalInfo lexicalInfo, Expression begin, Expression end, Expression step) : base(lexicalInfo) { this.Begin = begin; this.End = end; this.Step = step; }
public Slice(LexicalInfo lexicalInfo) : base(lexicalInfo) { }
public TryStatement(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
public RaiseStatement(LexicalInfo lexicalInfo, Expression exception) : base(lexicalInfo) { this.Exception = exception; }
public TryCastExpression(LexicalInfo lexicalInfo, Expression target, TypeReference type) : base(lexicalInfo) { this.Target = target; this.Type = type; }
void AddError(B.LexicalInfo lex, string errorMessage) { errors.Add(new CompilerError(lex, errorMessage)); }
public ReturnStatement(LexicalInfo li, Expression expression) : base(li) { this.Expression = expression; }
public RaiseStatement(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
public ReturnStatement(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
protected TypeMember(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }
public CallableBlockExpression(LexicalInfo lexicalInfo) : base(lexicalInfo) { }
void AddWarning(B.LexicalInfo lex, string warningMessage) { warnings.Add(new CompilerWarning(lex, warningMessage)); }
public Property(LexicalInfo lexicalInfoProvider) : base(lexicalInfoProvider) { }