public ClassCondition(StorageArea dataItem, SymbolReference characterClassNameReference, SyntaxProperty <bool> invertResult) : base(ExpressionNodeType.ClassCondition) { DataItem = dataItem; CharacterClassNameReference = characterClassNameReference; InvertResult = invertResult; }
private void ReplaceIfTypeCobol(ref string source, StorageArea variable, IList<Compiler.Scanner.Token> tokens, ref int index) { string head = variable.SymbolReference.ToString(); string tail = null; if (variable.SymbolReference.IsQualifiedReference) { var qualified = (QualifiedSymbolReference)variable.SymbolReference; head = qualified.First.ToString(); tail = qualified.Tail.ToString(); } Token first, last = null; int ifirst = IndexOf(tokens, out first, head, index); int ilast = ifirst+1; if (tail != null) ilast = IndexOf(tokens, out last, tail, index); int begin, end; GetSpan(first, last, out begin, out end); index = System.Math.Max(ifirst, ilast); var typecobol = variable.SymbolReference as TypeCobolQualifiedSymbolReference; if (typecobol == null) return; // nothing to do var str = new System.Text.StringBuilder(); begin -= 7; // indexes are decaled because of the 7 first columns of a COBOL file end -= 7; // (6 characters for sequence number + indicator character) str.Append(source.Substring(0,begin)); string delimiter = " OF "; foreach(var reference in typecobol) str.Append(reference).Append(delimiter); if (typecobol.Count > 0) str.Length -= delimiter.Length; str.Append(source.Substring(end,source.Length-end)); source = str.ToString(); }
public ClassCondition(StorageArea dataItem, SyntaxProperty <DataItemContentType> dataItemContentType, SyntaxProperty <bool> invertResult) : base(ExpressionNodeType.ClassCondition) { DataItem = dataItem; DataItemContentType = dataItemContentType; InvertResult = invertResult; }
public override string ToString() { if (StorageArea != null) { return(StorageArea.ToString()); } return(base.ToString()); }
public StorageAreaPropertySpecialRegister(Token specialRegisterName, StorageArea storageAreaReference) : base(StorageAreaKind.StorageAreaPropertySpecialRegister) { SpecialRegisterName = specialRegisterName; OtherStorageAreaReference = storageAreaReference; // This is both a storage area definition and a reference to the same storage area var storageAreaName = storageAreaReference != null?storageAreaReference.ToString() : "null"; DataDescriptionEntry = new SpecialRegisterDescriptionEntry(specialRegisterName, storageAreaName); SymbolReference = new SymbolReference(DataDescriptionEntry.DataName); }
public ReceivingStorageArea(StorageDataType dataType, [NotNull] StorageArea storageArea) : base(dataType, storageArea) { storageArea.IsReadFrom = false; storageArea.IsWrittenTo = true; }
public VariableOrExpression(StorageArea storageArea) : base(storageArea) { }
public Variable(StorageArea reference) : base(StorageDataType.Any, reference) { }
protected VariableBase(StorageDataType dataType, [CanBeNull] StorageArea storageArea) { DataType = dataType; StorageArea = storageArea; }
public ClassCondition(StorageArea dataItem, SymbolReference characterClassNameReference, SyntaxProperty<bool> invertResult) : base(ExpressionNodeType.ClassCondition) { DataItem = dataItem; CharacterClassNameReference = characterClassNameReference; InvertResult = invertResult; }
public CharacterVariable(StorageArea storageArea) : base(StorageDataType.Character, storageArea) { }
public NumericVariable(StorageArea storageArea) : base(StorageDataType.Numeric, storageArea) { }
public StorageAreaPropertySpecialRegister(Token specialRegisterName, StorageArea storageAreaReference) : base(StorageAreaKind.StorageAreaPropertySpecialRegister) { SpecialRegisterName = specialRegisterName; StorageAreaReference = storageAreaReference; }
public IntegerVariable([NotNull] StorageArea storageArea) : base(StorageDataType.Integer, storageArea) { }
public AlphanumericVariable(StorageArea storageArea) : base(StorageDataType.Alphanumeric, storageArea) { }
public StorageAreaPropertySpecialRegister(Token specialRegisterName, StorageArea storageAreaReference) : base(StorageAreaKind.StorageAreaPropertySpecialRegister) { SpecialRegisterName = specialRegisterName; OtherStorageAreaReference = storageAreaReference; // This is both a storage area definition and a reference to the same storage area var storageAreaName = storageAreaReference != null ? storageAreaReference.ToString() : "null"; DataDescriptionEntry = new SpecialRegisterDescriptionEntry(specialRegisterName, storageAreaName); SymbolReference = new SymbolReference(DataDescriptionEntry.DataName); }
public SymbolReferenceVariable(StorageDataType symbolType, StorageArea storageArea) : base(symbolType, storageArea) { }
public ClassCondition(StorageArea dataItem, SyntaxProperty<DataItemContentType> dataItemContentType, SyntaxProperty<bool> invertResult) : base(ExpressionNodeType.ClassCondition) { DataItem = dataItem; DataItemContentType = dataItemContentType; InvertResult = invertResult; }
public virtual bool Visit(StorageArea storageArea) { return(true); }