Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
        protected override ALSymbolInformation CreateMainALSymbol()
        {
            ALSymbolInformation symbol = base.CreateMainALSymbol();

            symbol.fullName = ALSyntaxHelper.EncodeName(this.Name) + ": " + ALSyntaxHelper.EncodeNamesList(this.FieldNames);
            return(symbol);
        }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 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());
     }
 }
Exemplo n.º 6
0
 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);
 }
Exemplo n.º 7
0
        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;
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 11
0
        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;
        }
Exemplo n.º 12
0
        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();
        }
Exemplo n.º 13
0
        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);
        }
Exemplo n.º 14
0
        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();
        }
Exemplo n.º 15
0
        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;
        }
Exemplo n.º 16
0
        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);
            }
        }
Exemplo n.º 17
0
 protected void ProcessEnumValueNode(ALSymbolInformation symbol, EnumValueSyntax syntax)
 {
     symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.EnumValueToken.ToFullString();
 }
Exemplo n.º 18
0
 protected void ProcessParameterNode(ALSymbolInformation symbol, ParameterSyntax syntax)
 {
     symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.Type.ToFullString();
 }
Exemplo n.º 19
0
 protected void ProcessVariableDeclarationNode(ALSymbolInformation symbol, VariableDeclarationSyntax syntax)
 {
     symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.Type.ToFullString();
 }
Exemplo n.º 20
0
 protected void ProcessKeyNode(ALSymbolInformation symbol, KeySyntax syntax)
 {
     symbol.fullName = ALSyntaxHelper.EncodeName(symbol.name) + ": " + syntax.Fields.ToFullString();
 }