Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
895 lines (773 sloc) 29.1 KB
using Nemerle;
using Nemerle.Collections;
using Nemerle.Extensions;
using Nemerle.Imperative;
using Nemerle.Text;
using Nemerle.Utility;
using Nitra.ClientServer.Macros;
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using System.Xml.Serialization;
namespace Nitra.ClientServer.Messages
{
public module Constants
{
public AsyncResponsePipeSuffix : string = "-async-response";
public ResponsePipeSuffix : string = "-response";
public RequestPipeSuffix : string = "-request";
public static AssemblyVersionGuid : string = MakeGuidString();
}
[NitraMessage]
public abstract class Message { }
[NitraMessage]
public abstract class RouterMessage : Message { }
[NitraMessage]
public variant ClientMessage : RouterMessage
{
| CheckVersion { assemblyVersionGuid : string; }
| SolutionStartLoading { id : SolutionId; fullPath : string; }
| SolutionLoaded { id : SolutionId; }
| SolutionUnloaded { id : SolutionId; }
| ProjectStartLoading { id : ProjectId; fullPath : string; config : Config; }
| ProjectLoaded { id : ProjectId; }
| ProjectUnloaded { id : ProjectId; }
| ProjectRename { oldId : ProjectId; newId : ProjectId; newPath : string; }
| ProjectReferenceLoaded { projectId : ProjectId; referencedProjectId : ProjectId; path : string; }
| ProjectReferenceUnloaded { projectId : ProjectId; referencedProjectId : ProjectId; path : string; }
| ReferenceLoaded { projectId : ProjectId; name : string; }
| ReferenceUnloaded { projectId : ProjectId; name : string; }
| FileSaved { id : FileId; version : FileVersion; }
| FileLoaded { projectId : ProjectId; fullPath : string; id : FileId; version : FileVersion; hasContent : bool; contentOpt : string; }
| FileReparse { id : FileId; }
| FileUnloaded { projectId : ProjectId; id : FileId; }
| FileRenamed { oldId : FileId; newId : FileId; newPath : string; }
| FileInMemoryLoaded { projectId : ProjectId; id : FileId; name : string; content : string; }
| FileActivated { projectId : ProjectId; id : FileId; version : FileVersion; }
| FileDeactivated { projectId : ProjectId; id : FileId; }
| FileChanged { id : FileId; version : FileVersion; change : FileChange; caretPos : VersionedPos; }
| FileChangedBatch { id : FileId; version : FileVersion; changes : ImmutableArray[FileChange]; caretPos : VersionedPos; }
| PrettyPrint { state : PrettyPrintState; }
| CompleteWord { projectId : ProjectId; id : FileId; version : FileVersion; pos : int; }
| CompleteWordDismiss { projectId : ProjectId; id : FileId }
| FindSymbolReferences { projectId : ProjectId; fileId : FileId; pos : VersionedPos; }
| FindSymbolDefinitions { projectId : ProjectId; fileId : FileId; pos : VersionedPos; }
| ParseTreeReflection { enable : bool; }
| GetObjectContent { solutionId : SolutionId; projectId : ProjectId; fileId : FileId; fileVersion : FileVersion; objectId : int; }
| GetObjectGraph { solutionId : SolutionId; projectId : ProjectId; fileId : FileId; fileVersion : FileVersion; objectId : int; }
| AttachDebugger { }
| GetLibsMetadata { libs : ImmutableArray[string]; }
| GetLibsSyntaxModules { libs : ImmutableArray[string]; }
| GetLibsProjectSupports { libs : ImmutableArray[string]; }
| GetFileExtensions { projectId : ProjectId; languageNames : ImmutableArray[string]; }
| SetCaretPos { projectId : ProjectId; fileId : FileId; pos : VersionedPos; }
| GetHint { projectId : ProjectId; fileId : FileId; pos : VersionedPos; }
| GetSubHint { projectId : ProjectId; symbolId : int; }
| FindDeclarations { pattern : string; primaryProjectId : ProjectId; hideExternalItems : bool; kinds : ImmutableArray[string]; }
| Shutdown { }
public override ToString() : string { ToStringImpl() }
}
[NitraMessage]
public variant ServerMessage
{
| FindSymbolDefinitions { solutionId : SolutionId; referenceSpan : NSpan; definitions : ImmutableArray[SymbolLocation]; }
| FindSymbolReferences { solutionId : SolutionId; referenceSpan : NSpan; symbols : ImmutableArray[SymbolRreferences]; }
| ParseTreeReflection { solutionId : SolutionId; root : ImmutableArray[ParseTreeReflectionStruct]; }
| ObjectContent { solutionId : SolutionId; content : ContentDescriptor; }
| LibsMetadata { solutionId : SolutionId; metadatas : ImmutableArray[LibMetadata]; }
| LibsSyntaxModules { solutionId : SolutionId; modules : ImmutableArray[SyntaxModules]; }
| LibsProjectSupports { solutionId : SolutionId; libs : ImmutableArray[ProjectSupports]; }
| FileExtensions { solutionId : SolutionId; fileExtensions : ImmutableArray[string]; }
| SubHint { text : string; }
public override ToString() : string { ToStringImpl() }
}
[NitraMessage]
public variant AsyncServerMessage
{
public FileId : FileId;
public Version : FileVersion;
public SolutionId : SolutionId;
| LanguageLoaded { spanClassInfos : ImmutableArray[SpanClassInfo]; }
| OutliningCreated { projectId : ProjectId; outlining : ImmutableArray[OutliningInfo]; }
| KeywordsHighlightingCreated { projectId : ProjectId; spanInfos : ImmutableArray[SpanInfo]; }
| MatchedBrackets { projectId : ProjectId; results : ImmutableArray[MatchBrackets]; }
| SymbolsHighlightingCreated { projectId : ProjectId; spanInfos : ImmutableArray[SpanInfo]; }
| ProjectLoadingMessages { projectId : ProjectId; messages : array[CompilerMessage]; }
| ParsingMessages { projectId : ProjectId; messages : array[CompilerMessage]; }
| MappingMessages { projectId : ProjectId; messages : array[CompilerMessage]; }
| SemanticAnalysisMessages { projectId : ProjectId; messages : array[CompilerMessage]; }
| SemanticAnalysisDone { projectId : ProjectId; }
| PrettyPrintCreated { type : PrettyPrintState; text : string; }
| ReflectionStructCreated { root : ParseTreeReflectionStruct; }
| RefreshReferencesFailed { exception : string; }
| RefreshProjectFailed { exception : string; }
| FindSymbolReferences { referenceSpan : NSpan; symbols : ImmutableArray[SymbolRreferences]; }
| Hint { text : string; referenceSpan : NSpan; }
| Exception { exception : string; }
| FoundDeclarations { projectId : ProjectId; declarations : ImmutableArray[DeclarationInfo]; }
| CompleteWord { replacementSpan : NSpan; completionList : ImmutableArray[CompletionElem]; }
public override ToString() : string { ToStringImpl() }
}
[NitraMessage]
public class ProjectSupports
{
public ProjectSupports : ImmutableArray[ProjectSupport];
public override ToString() : string { ProjectSupports.ToString(", ") }
}
[NitraMessage]
public class SyntaxModules
{
public Modules : ImmutableArray[string];
}
[NitraMessage]
public class LibMetadata
{
public ProjectSupprts : ImmutableArray[string];
public Languages : ImmutableArray[LanguageInfo];
}
[NitraMessage, StructuralEquality]
public struct SymbolRreferences
{
public SymbolId : int;
public Definitions : ImmutableArray[SymbolLocation];
public References : ImmutableArray[FileEntries]
}
public enum PrettyPrintState
{
| Disabled
| Text
| Html
}
[NitraMessage, StructuralEquality]
public struct NSpan : IComparable[NSpan]
{
public StartPos : int;
public EndPos : int;
public Length : int { get { EndPos - StartPos }}
public IsEmpty : bool
{
get { StartPos == EndPos }
}
public IntersectsWith(pos : int) : bool { pos <= EndPos && pos >= StartPos }
public IntersectsWith(start : int, end : int) : bool { start <= EndPos && end >= StartPos }
public IntersectsWith(other : NSpan) : bool { IntersectsWith(other.StartPos, other.EndPos) }
public IntersectsWith(other : Range) : bool { IntersectsWith(other.Span) }
public IntersectsWith(other : Location) : bool { IntersectsWith(other.Range) }
public override ToString() : string { StartPos + ", " + EndPos }
public CompareTo(other : NSpan) : int
{
def result = StartPos.CompareTo(other.StartPos);
if (result == 0)
EndPos.CompareTo(other.EndPos)
else
result
}
}
[NitraMessage, StructuralEquality]
public struct SpanInfo
{
public static Comparer : SpanInfoComparer = SpanInfoComparer();
public Span : NSpan;
public SpanClassId : int;
public override ToString() : string
{
"Span=" + Span + ", SpanClassId=" + SpanClassId
}
public class SpanInfoComparer : IComparer[SpanInfo]
{
public Compare(x : SpanInfo, y : SpanInfo) : int
{
def res = x.Span.StartPos.CompareTo(y.Span.StartPos);
when (res != 0)
return res;
x.SpanClassId - y.SpanClassId
}
}
}
[NitraMessage]
public variant FileChange
{
| Insert { pos : int; text : string }
| Delete { span : NSpan }
| Replace { span : NSpan; text : string }
}
[NitraMessage, StructuralEquality]
public struct FileIdentity : IComparable[FileIdentity]
{
public FileId : FileId;
public FileVersion : FileVersion;
public CompareTo(other : FileIdentity) : int
{
FileId.Value.CompareTo(other.FileId.Value)
}
}
[NitraMessage]
public struct FileEntries
{
public File : FileIdentity;
public Ranges : ImmutableArray[Range];
}
[NitraMessage]
public struct DeclarationInfo
{
public SymbolId : int;
public Name : string;
/// Spans which match te pattern
public NameMatchRuns : ImmutableArray[NSpan];
public FullName : string;
public Kind : string;
public SpanClassId : int;
public Location : Location;
}
[NitraMessage]
public struct SymbolLocation
{
public SymbolId : int;
public Location : Location;
}
[NitraMessage, StructuralEquality]
public struct Range : IComparable[Range]
{
public Span : NSpan;
public StartLine : int;
public StartColumn : int;
public EndLine : int;
public EndColumn : int;
public Text : string;
public CompareTo(other : Range) : int { Span.CompareTo(other.Span) }
public override ToString() : string { "{" + StartLine + ", " + StartColumn + "}" }
}
[NitraMessage, StructuralEquality]
public struct Location : IComparable[Location]
{
public File : FileIdentity;
public Range : Range;
public Span : NSpan { get { this.Range.Span } }
public CompareTo(other : Location) : int
{
mutable result = File.CompareTo(other.File);
if (result == 0)
Range.CompareTo(other.Range)
else
result
}
public override ToString() : string
{
"Location(" + this.File.FileId.Value + ", v=" + this.File.FileVersion.Value + ", " + this.Range + ")"
}
}
public enum CompilerMessageSource : byte
{
| ProjectLoading
| Parsing
| Mapping
| SemanticAnalysis
}
public enum CompilerMessageType
{
| FatalError = 0
| Error = 1
| Warning = 2
| Hint = 3
}
[NitraMessage]
public struct CompilerMessage : IComparable[CompilerMessage]
{
public Type : CompilerMessageType;
public Location : Location;
public Text : string;
public Number : int;
public Source : CompilerMessageSource;
public NestedMessages : list[CompilerMessage];
public CompareTo(other : CompilerMessage) : int
{
def result1 = this.Location.CompareTo(other.Location);
when (result1 != 0)
return result1;
def result2 = Type :> int - other.Type :> int;
when (result2 != 0)
return result2;
string.Compare(Text, other.Text, StringComparison.Ordinal)
}
[OverrideObjectEquals]
Equals(other : CompilerMessage) : bool
{
when (!this.Location.Equals(other.Location))
return false;
when (Type != other.Type)
return false;
string.Equals(Text, other.Text)
}
public override GetHashCode() : int
{
this.Location.GetHashCode() ^ Type :> int ^ Text.GetHashCode()
}
}
[NitraMessage]
public sealed class ProjectSupport
{
public this()
{
Caption = "";
TypeFullName = "";
Path = "";
}
/// Caption from ProjectSupportAttributr of the type which implement IProjectSupport
[XmlAttribute] public mutable Caption : string;
/// Fully qualified name of the type which implement IProjectSupport
[XmlAttribute] public mutable TypeFullName : string;
/// Path of assembly where defined the type which implement IProjectSupport
[XmlAttribute] public mutable Path : string;
public IsNotSpecified : bool { get { string.IsNullOrEmpty(TypeFullName) || string.IsNullOrEmpty(Caption) } }
public override ToString() : string { if (IsNotSpecified) "<not specified>" else Caption }
}
[NitraMessage]
public sealed class Config
{
public this() { }
public static InitNew() : Config
{
def x = Config();
x.ProjectSupport = ProjectSupport();
x.Languages = array(0);
x.References = array(0);
x
}
/// Descriptions of class which implements IProjectSupport
public mutable ProjectSupport : ProjectSupport;
/// Language descriptions
[XmlArray(ElementName="Languages", IsNullable=false)]
[XmlArrayItem("Language")]
public mutable Languages : array[LanguageInfo];
/// Library references
[XmlArray(ElementName="References", IsNullable=false)]
[XmlArrayItem("Reference")]
public mutable References : array[string];
}
[NitraMessage]
public struct DynamicExtensionInfo
{
/// Fully qualified name of syntax modules which contains lanuage extensions
[XmlAttribute] public mutable Name : string;
/// Path of assembly where defined lanuage extensions
[XmlAttribute] public mutable Path : string;
public override ToString() : string { "DynamicExtension: " + Name }
}
[NitraMessage]
public struct LanguageInfo
{
/// Fully qualified name of the lanuage
[XmlAttribute] public mutable Name : string;
/// Path of assembly where defined the type where defined lanuage
[XmlAttribute] public mutable Path : string;
/// List of dynamically loaded extensions of the lanuage
[XmlArray(ElementName="DynamicExtensions", IsNullable=false)]
[XmlArrayItem("Extension")]
public mutable DynamicExtensions : array[DynamicExtensionInfo];
public override ToString() : string { "Language: " + Name }
}
[NitraMessage]
public struct SpanClassInfo
{
public FullName : string;
public Id : int;
public ForegroundColor : int;
public override ToString() : string
{
"SpanClass=" + FullName + " Id=" + Id
}
}
[NitraMessage]
public struct OutliningInfo
{
public static Comparer : OutliningInfoComparer = OutliningInfoComparer();
public Span : NSpan;
public IsDefaultCollapsed : bool;// TODO: use bit field
public IsImplementation : bool;
public override ToString() : string
{
"Outlining({" + Span + (if (IsDefaultCollapsed) "}, Collapsed)" else "})")
}
public class OutliningInfoComparer : IComparer[OutliningInfo]
{
public Compare(x : OutliningInfo, y : OutliningInfo) : int
{
x.Span.StartPos.CompareTo(y.Span.StartPos)
}
}
}
public class CompletionElemComparer : IComparer[CompletionElem]
{
public Compare(x : CompletionElem, y : CompletionElem) : int
{
x.Text.CompareTo(y.Text)
}
}
[NitraMessage]
public variant CompletionElem
{
| Literal { text : string; description : string; }
| Symbol { Id : int; name : string; content : string; description : string; iconId : int; }
public override ToString() : string
{
match (this)
{
| Literal as x => "Literal: " + x.text
| Symbol as x => "Symbol: " + x.description
}
}
public Text : string
{
get
{
match (this)
{
| Literal as x => x.text
| Symbol as x => x.name
}
}
}
}
public enum ReflectionKind
{
| Normal
| Recovered
| Ambiguous
| Deleted
}
[NitraMessage]
public class ReflectionInfo
{
public ShortName : string;
public FullName : string;
public IsMarker : bool;
public CanParseEmptyString : bool;
}
[NitraMessage]
public class ParseTreeReflectionStruct
{
public info : ReflectionInfo;
public description : string;
public kind : ReflectionKind;
public span : NSpan;
public children : ImmutableArray[ParseTreeReflectionStruct];
public Info : ReflectionInfo { get { info } }
public Description : string { get { description } }
public Kind : ReflectionKind { get { kind } }
public Span : NSpan { get { span } }
public Children : ImmutableArray[ParseTreeReflectionStruct] { get { children } }
public override ToString() : string{ Description + " Count=" + Children.Length }
}
[NitraMessage]
public class GrammarDescriptor
{
public FullName: string;
public AssemblyLocation: string;
}
[NitraMessage]
public class LibReference
{
public Name: string;
}
public enum PropertyKind
{
| Simple
| DependentIn
| DependentOut
| DependentInOut
| Ast
}
[NitraMessage]
public variant ContentDescriptor
{
| Fail { msg : string; }
| Members { members : array[PropertyDescriptor]; }
| Items { items : array[ObjectDescriptor]; }
| AstItems { members : array[PropertyDescriptor]; items : array[ObjectDescriptor]; }
}
[NitraMessage]
public variant ObjectDescriptor
{
| Unknown { str : string; }
| Null { }
| NotEvaluated { }
| Ast { span : NSpan; id : int; str : string; typeName : string; typeFullName : string; mutable members : array[PropertyDescriptor]; }
| Symbol { id : int; name : string; fullName : string; typeName : string; typeFullName : string; mutable members : array[PropertyDescriptor]; }
| Object { id : int; str : string; typeName : string; typeFullName : string; mutable members : array[PropertyDescriptor]; }
| AstList { span : NSpan; id : int; mutable items : array[ObjectDescriptor]; mutable members : array[PropertyDescriptor]; count : int; }
| Seq { id : int; mutable items : array[ObjectDescriptor]; count : int; }
| String { value : string; }
| Int16 { value : System.Int16 ; }
| Int32 { value : System.Int32 ; }
| Int64 { value : System.Int64 ; }
| Char { value : System.Char ; }
| SByte { value : System.SByte ; }
| UInt16 { value : System.UInt16 ; }
| UInt32 { value : System.UInt32 ; }
| UInt64 { value : System.UInt64 ; }
| Byte { value : System.Byte ; }
| Single { value : System.Single ; }
| Double { value : System.Double ; }
| Boolean { value : System.Boolean; }
| Parsed { span : NSpan; value : ObjectDescriptor; }
public IsObject : bool { get { match (this) { | Ast | Symbol | Object => true | _ => false } } }
public IsSeq : bool { get { match (this) { | AstList | Seq => true | _ => false } } }
public Properties : array[PropertyDescriptor]
{
get
{
match (this)
{
| Ast as x => x.members
| Symbol as x => x.members
| Object as x => x.members
| AstList as x => x.members
| _ => null
}
}
}
public Items : array[ObjectDescriptor]
{
get
{
match (this)
{
| AstList as x => x.items
| Seq as x => x.items
| _ => null
}
}
}
public Count : int
{
get
{
match (this)
{
| AstList as x => x.count
| Seq as x => x.count
| _ => 0
}
}
}
public Id : int
{
get
{
match (this)
{
| Ast as x => x.id
| Symbol as x => x.id
| Object as x => x.id
| AstList as x => x.id
| Seq as x => x.id
| _ => -1
}
}
}
public Span : NSpan
{
get
{
match (this)
{
| Ast as x => x.span
| AstList as x => x.span
| Parsed as x => x.span
| _ => NSpan()
}
}
}
public Value : object
{
get
{
match (this)
{
| Parsed as x => "ParserValue(" + x.value + ")"
| Ast as x when x.Id == 0 => "<Root>"
| Ast as x => x.typeName + " \"" + x.str + "\""
| Symbol as x => x.name
| Object as x => x.str
| AstList as x => "Count=" + x.Count
| Seq as x => "Count=" + x.Count
| String as x => "\"" + x.value + "\""
| Int16 as x => x.value.ToString()
| Int32 as x => x.value.ToString()
| Int64 as x => x.value.ToString()
| Char as x => x.value.ToString()
| SByte as x => x.value.ToString()
| UInt16 as x => x.value.ToString()
| UInt32 as x => x.value.ToString()
| UInt64 as x => x.value.ToString()
| Byte as x => x.value.ToString()
| Single as x => x.value.ToString()
| Double as x => x.value.ToString()
| Boolean as x => x.value.ToString()
| Unknown as x => "Unknown<" + x.str + ">"
| Null => "<null>"
| NotEvaluated => "<not evaluated>"
| _ => null
}
}
}
public TypeFullName : string
{
get
{
match (this)
{
| Parsed as x => "ParserValue<" + x.value.TypeFullName + ">"
| Ast as x when x.Id == 0 => "Ast"
| Ast as x => x.typeFullName
| Symbol as x => x.typeFullName
| Object as x => x.typeFullName
| AstList => "AstList"
| Seq => "Seq"
| String => "String"
| Int16 => "Int16"
| Int32 => "Int32"
| Int64 => "Int64"
| Char => "Char"
| SByte => "SByte"
| UInt16 => "UInt16"
| UInt32 => "UInt32"
| UInt64 => "UInt64"
| Byte => "Byte"
| Single => "Single"
| Double => "Double"
| Boolean => "Boolean"
| Unknown => ""
| _ => ""
}
}
}
public SetContent(content : ContentDescriptor) : void
{
| Members(members) =>
match (this)
{
| Ast as x => x.members = members;
| Symbol as x => x.members = members;
| Object as x => x.members = members;
| _ => assert(false);
}
| Items(items) =>
match (this)
{
| AstList as x => x.items = items;
| Seq as x => x.items = items;
| _ => assert(false);
}
| AstItems(members, items) =>
match (this)
{
| AstList as x => x.members = members; x.items = items;
| _ => assert(false);
}
| Fail => ()
}
public override ToString() : string
{
match (Value)
{
| null => "<null>"
| x => x.ToString()
}
}
}
[NitraMessage]
public class PropertyDescriptor
{
public Kind : PropertyKind;
public Name : string;
public Object : ObjectDescriptor;
public override ToString() : string
{
def prefix =
match (Kind)
{
| PropertyKind.DependentIn => "in "
| PropertyKind.DependentOut => "out "
| PropertyKind.DependentInOut => "inout "
| PropertyKind.Ast => "ast "
| PropertyKind.Simple => null
};
prefix + Name + " " + Object
}
}
[NitraMessage]
[StructuralEquality]
public struct MatchBrackets
{
public Open : NSpan;
public Close : NSpan;
}
[Record]
[StructuralEquality]
public struct SolutionId
{
public static Invalid : SolutionId = SolutionId(-1);
public Value : int;
public Serialize(writer : BinaryWriter) : void { writer.Write(Value); }
public static new Deserialize(reader : BinaryReader) : SolutionId { SolutionId(reader.ReadInt32()) }
public static @:(x : SolutionId) : int { x.Value }
public static @>=(x : SolutionId, y : SolutionId) : bool { x.Value >= y.Value }
public static @<=(x : SolutionId, y : SolutionId) : bool { x.Value <= y.Value }
public override ToString() : string { Value.ToString() }
}
[Record]
[StructuralEquality]
public struct ProjectId
{
public static Invalid : ProjectId = ProjectId(-1);
public Value : int;
public Serialize(writer : BinaryWriter) : void { writer.Write(Value); }
public static new Deserialize(reader : BinaryReader) : ProjectId { ProjectId(reader.ReadInt32()) }
public static @:(x : ProjectId) : int { x.Value }
public static @>=(x : ProjectId, y : ProjectId) : bool { x.Value >= y.Value }
public static @<=(x : ProjectId, y : ProjectId) : bool { x.Value <= y.Value }
public override ToString() : string { Value.ToString() }
}
[Record]
[StructuralEquality]
public struct FileId
{
public static Invalid : FileId = FileId(-1);
public Value : int;
public Serialize(writer : BinaryWriter) : void { writer.Write(Value); }
public static new Deserialize(reader : BinaryReader) : FileId { FileId(reader.ReadInt32()) }
public IsValid : bool { get { Value >= 0 } }
public static @:(x : FileId) : int { x.Value }
public static @>=(x : FileId, y : FileId) : bool { x.Value >= y.Value }
public static @<=(x : FileId, y : FileId) : bool { x.Value <= y.Value }
public override ToString() : string { Value.ToString() }
}
[Record]
[StructuralEquality]
public struct FileVersion
{
public static Invalid : FileVersion = FileVersion(-1);
public Value : int;
public IsInvalid : bool { get { Value < 0 } }
public Serialize(writer : BinaryWriter) : void { writer.Write(Value); }
public static new Deserialize(reader : BinaryReader) : FileVersion { FileVersion(reader.ReadInt32()) }
public static @:(x : FileVersion) : int { x.Value }
public static @>=(x : FileVersion, y : FileVersion) : bool { x.Value >= y.Value }
public static @<=(x : FileVersion, y : FileVersion) : bool { x.Value <= y.Value }
public override ToString() : string { Value.ToString() }
}
[NitraMessage]
[StructuralEquality]
public struct VersionedPos
{
public static Invalid : VersionedPos = VersionedPos(-1, FileVersion(-1));
public Pos : int;
public Version : FileVersion;
public IsInvalid : bool { get { Pos < 0 || Version.IsInvalid } }
public override ToString() : string { if (IsInvalid) "<VersionedPos.Invalid>" else ("VersionedPos(" + Pos + ", " + Version + ")") }
}
}
You can’t perform that action at this time.