protected override ALSymbolInformation CreateMainALSymbol() { ALSymbolInformation symbol = base.CreateMainALSymbol(); symbol.fullName = symbol.kind.ToName() + " " + ALSyntaxHelper.EncodeName(this.Name); return(symbol); }
protected override ALSymbolInformation CreateMainALSymbol() { ALSymbolInformation symbol = base.CreateMainALSymbol(); //build full name string fullName = ALSyntaxHelper.EncodeName(this.Name) + "("; if (this.Parameters != null) { for (int i = 0; i < this.Parameters.Count; i++) { if (i > 0) { fullName = fullName + ", "; } fullName = fullName + this.Parameters[i].GetSourceCode(); } } fullName = fullName + ")"; if ((this.ReturnTypeDefinition != null) && (!this.ReturnTypeDefinition.IsEmpty())) { fullName = fullName + ": " + this.ReturnTypeDefinition.GetSourceCode(); } symbol.fullName = fullName; return(symbol); }
protected override ALSymbolInformation CreateMainALSymbol() { ALSymbolInformation symbol = base.CreateMainALSymbol(); symbol.fullName = ALSyntaxHelper.EncodeName(this.Name) + ": " + ALSyntaxHelper.EncodeNamesList(this.FieldNames); return(symbol); }
protected void ProcessXmlPortTableElementNode(SyntaxTree syntaxTree, ALSymbolInformation symbol, XmlPortTableElementSyntax syntax) { symbol.fullName = symbol.kind.ToName() + " " + ALSyntaxHelper.EncodeName(symbol.name) + ": Record " + syntax.SourceTable.ToFullString(); symbol.source = ALSyntaxHelper.DecodeName(syntax.SourceTable.ToFullString()); this.ProcessNodeContentRange(syntaxTree, symbol, syntax, syntax.OpenBraceToken, syntax.CloseBraceToken); }
protected void ProcessReportColumnNode(ALSymbolInformation symbol, ReportColumnSyntax syntax) { symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.SourceExpression.ToFullString(); if (syntax.SourceExpression != null) { symbol.source = ALSyntaxHelper.DecodeName(syntax.SourceExpression.ToString()); } }
protected void ProcessReportDataItemNode(SyntaxTree syntaxTree, ALSymbolInformation symbol, ReportDataItemSyntax syntax) { symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": Record " + syntax.DataItemTable.ToFullString(); if (syntax.DataItemTable != null) { symbol.source = ALSyntaxHelper.DecodeName(syntax.DataItemTable.ToString()); } this.ProcessNodeContentRange(syntaxTree, symbol, syntax, syntax.OpenBraceToken, syntax.CloseBraceToken); }
protected void ProcessPageChartPartNode(ALSymbolInformation symbol, PageChartPartSyntax syntax) { string name = symbol.kind.ToName() + " " + ALSyntaxHelper.EncodeName(symbol.name); if (syntax.ChartPartType != null) { symbol.fullName = name + ": " + syntax.ChartPartType.ToFullString(); } symbol.fullName = name; }
protected override ALSymbolInformation CreateMainALSymbol() { ALSymbolInformation symbol = base.CreateMainALSymbol(); if (!String.IsNullOrWhiteSpace(this.RelatedTable)) { symbol.fullName = ALSyntaxHelper.EncodeName(this.Name) + ": " + ALSyntaxHelper.EncodeName(this.RelatedTable); } return(symbol); }
protected override ALSymbolInformation CreateMainALSymbol() { ALSymbolInformation symbol = base.CreateMainALSymbol(); if (this.TypeDefinition != null) { symbol.fullName = ALSyntaxHelper.EncodeName(this.Name) + ": " + this.TypeDefinition.GetSourceCode(); } return(symbol); }
protected override ALSymbolInformation CreateMainALSymbol() { ALSymbolInformation symbol = new ALSymbolInformation(this.GetALSymbolKind(), this.TypeName); if (!String.IsNullOrWhiteSpace(this.AliasName)) { symbol.fullName = ALSyntaxHelper.EncodeName(this.AliasName) + ": " + ALSyntaxHelper.EncodeName(this.TypeName.NotNull()); } return(symbol); }
protected void ProcessEventDeclarationNode(ALSymbolInformation symbol, EventDeclarationSyntax syntax) { string namePart = "("; if ((syntax.ParameterList != null)) // && (syntax.ParameterList.Parameters != null)) { namePart = namePart + syntax.ParameterList.Parameters.ToFullString(); } namePart = namePart + ")"; symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + namePart; }
protected void ProcessEnumValueNode(ALSymbolInformation symbol, EnumValueSyntax syntax) { string idText = syntax.Id.ToString(); if (!String.IsNullOrWhiteSpace(idText)) { int id; if (Int32.TryParse(idText, out id)) { symbol.id = id; } } symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name); // + ": " + syntax.EnumValueToken.ToFullString(); }
public override string GetSourceCode() { string sourceCode = ALSyntaxHelper.EncodeName(this.Name); if (this.IsVar) { sourceCode = "var " + sourceCode; } if (this.TypeDefinition != null) { sourceCode = sourceCode + ": " + this.TypeDefinition.GetSourceCode(); } return(sourceCode); }
protected void ProcessFieldNode(ALSymbolInformation symbol, FieldSyntax syntax) { Type syntaxType = syntax.GetType(); if (syntax.No != null) { string idText = syntax.No.ToString(); int id = 0; if (Int32.TryParse(idText, out id)) { symbol.id = id; } } symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.Type.ToFullString(); }
protected void ProcessMethodOrTriggerDeclarationNode(ALSymbolInformation symbol, MethodOrTriggerDeclarationSyntax syntax) { string namePart = "("; if ((syntax.ParameterList != null))// && (syntax.ParameterList.Parameters != null)) { namePart = namePart + syntax.ParameterList.Parameters.ToFullString(); } namePart = namePart + ")"; if ((syntax.ReturnValue != null) && (syntax.ReturnValue.Kind.ConvertToLocalType() != ConvertedSyntaxKind.None)) { namePart = namePart + " " + syntax.ReturnValue.ToFullString(); } symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + namePart; }
protected void ProcessVariableListDeclarationNode(SyntaxTree syntaxTree, ALSymbolInformation parent, VariableListDeclarationSyntax node) { string typeName = node.Type.ToFullString(); string elementDataType = typeName; if (node.Type.DataType != null) { elementDataType = node.Type.DataType.ToString(); } foreach (VariableDeclarationNameSyntax nameNode in node.VariableNames) { ALSymbolInformation variableSymbol = CreateSymbolInfo(syntaxTree, nameNode); //new ALSymbolInformation(ALSymbolKind.VariableDeclaration, variableName); variableSymbol.fullName = ALSyntaxHelper.EncodeName(variableSymbol.name) + ": " + typeName; variableSymbol.subtype = typeName; variableSymbol.elementsubtype = elementDataType; parent.AddChildSymbol(variableSymbol); } }
protected void ProcessEnumValueNode(ALSymbolInformation symbol, EnumValueSyntax syntax) { symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.EnumValueToken.ToFullString(); }
protected void ProcessParameterNode(ALSymbolInformation symbol, ParameterSyntax syntax) { symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.Type.ToFullString(); }
protected void ProcessVariableDeclarationNode(ALSymbolInformation symbol, VariableDeclarationSyntax syntax) { symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.Type.ToFullString(); }
protected void ProcessKeyNode(ALSymbolInformation symbol, KeySyntax syntax) { symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.Fields.ToFullString(); }