private void RegisterDesignator(ISymbol scope, AstElement node, Boogie.IToken token, string identifier) { var symbol = GetSymbolDeclarationByName(scope, identifier); if (symbol != null) { // Many resolutions for automatically generated nodes (e.g. Decreases, Update when initializating a variable // at declaration) cause duplicated visits. These cannot be prevented at this time as it seems there's no way // to distinguish nodes from automatically created one (i.e. nodes of the original syntax tree vs. nodes of the // abstract syntax tree). We could just ignore such duplicates. However, we may miss programatic errors if we // do so. var range = token.GetLspRange(); SymbolLookup.Add(range.Start, range.End, symbol); designators.Add(node, symbol); } else { logger.LogInformation("could not resolve the symbol of designator named {Identifier} in {Filename}@({Line},{Column})", identifier, token.GetDocumentFileName(), token.line, token.col); } }
public override void VisitUnknown(object node, Boogie.IToken token) { logger.LogDebug("encountered unknown syntax node of type {NodeType} in {Filename}@({Line},{Column})", node.GetType(), token.GetDocumentFileName(), token.line, token.col); }