public FunctionDeclarationHeader(SymbolDefinition name, AccessModifier visibility, FunctionType type) : base(CodeElementType.FunctionDeclarationHeader) { this.FunctionName = name; this.Visibility = visibility; this.UserDefinedType = type != null ? type : FunctionType.Undefined; this.Profile = new ParametersProfile(); }
public SpecialRegisterDescriptionEntry(Token specialRegisterName, string storageAreaNameOrFileName) : base() { // Generate a unique symbol name for this special register var generatedSymbolName = new GeneratedSymbolName(specialRegisterName, specialRegisterName.Text + "-" + storageAreaNameOrFileName); DataName = new SymbolDefinition(generatedSymbolName, SymbolType.DataName); SpecialRegisterName = specialRegisterName; }
public FunctionCallResultDescriptionEntry(FunctionCall functionCall, int callSiteId) : base() { // Generate a unique symbol name for the function call at this specific call site var generatedSymbolName = new GeneratedSymbolName(functionCall.FunctionNameToken, functionCall.FunctionName + "-" + callSiteId); DataName = new SymbolDefinition(generatedSymbolName, SymbolType.DataName); FunctionCall = functionCall; }
public static StorageArea CreateReceivingStorageArea(SymbolDefinition symbol) { if (symbol == null) return null; var storage = new DataOrConditionStorageArea(new SymbolReference(symbol)); return storage; }
public GeneratedParameter(SymbolDefinition symbol) { this.StorageArea = CreateReceivingStorageArea(symbol); var mode = TypeCobol.Compiler.CodeElements.ParameterSharingMode.ByReference; this.SharingMode = new SyntaxProperty<ParameterSharingMode>(mode, null); }
internal SymbolDefinition CreateSymbolDefinition(CodeElementsParser.SymbolDefinition11Context context, SymbolType symbolType) { AlphanumericValue nameLiteral = CreateAlphanumericValue(context.alphanumericValue11()); var symbolDefinition = new SymbolDefinition(nameLiteral, symbolType); symbolInformationForTokens[nameLiteral.Token] = symbolDefinition; return symbolDefinition; }
internal SymbolDefinition CreateSymbolDefinition([CanBeNull] CodeElementsParser.SymbolDefinition4Context context, SymbolType symbolType) { if (context == null) return null; AlphanumericValue nameLiteral = CreateAlphanumericValue(context.alphanumericValue4()); var symbolDefinition = new SymbolDefinition(nameLiteral, symbolType); symbolInformationForTokens[nameLiteral.Token] = symbolDefinition; return symbolDefinition; }
public SymbolReference(SymbolDefinition symbol) : this(symbol.NameLiteral, symbol.Type) { }
public virtual bool Visit(SymbolDefinition symbolDefinition) { return(true); }
public SymbolReference(SymbolDefinition symbol) : this(symbol.NameLiteral, symbol.Type) { }