Exemplo n.º 1
0
 /// <summary>
 /// The use statement list doesn't really have a location
 /// TODO:  it probably shouldn't be a node type.  It should be just a property on Module
 /// </summary>
 /// <param name="useStatements"></param>
 public UseStatementList(UseStatement[] useStatements)
     : base(HappySourceLocation.None, HappySourceLocation.None)
 {
     this.UseStatements = useStatements;
 }
Exemplo n.º 2
0
 public override void Visit(UseStatement node)
 {
     var callExpr = getUseStatementCall(String.Join(".", node.NamespaceSegments));
     _expressionStack.Push(node, callExpr);
 }
Exemplo n.º 3
0
 public override void Visit(UseStatement node)
 {
     DebugAssert.IsTrue(this.IsInImportScope, "Use statement processed while not in import scope");
     addTrackerForDeepestNamespaceToModuleSymbolTable(node.NamespaceSegments, invalidNamespaceSegment => _errorCollector.UseStatementDoesNotEvaluateToANamespace(node, invalidNamespaceSegment));
 }
Exemplo n.º 4
0
 //public virtual void Visit(AstNodeBase node)
 //{
 //    this.BeforeVisitCatchAll(node);
 //}
 //public virtual void Visit(Module node, SourceUnit sourceUnit)
 //{
 //    this.BeforeVisitCatchAll(node);
 //}
 public virtual void Visit(UseStatement node)
 {
     this.BeforeVisitCatchAll(node);
 }
Exemplo n.º 5
0
 public void UseStatementDoesNotEvaluateToANamespace(UseStatement node, string segment)
 {
     this.Add(node.Location, ErrorCode.UseStatementDoesNotEvaluateToANamespace_Segment_Namespace, node, String.Join(".", node.NamespaceSegments), node.NamespaceSegments);
 }