Esempio n. 1
0
 public AstName(AstName nameToCopy)
 {
     _parts          = nameToCopy._parts.Select(p => new NamePart(p)).ToArray();
     _nameIndex      = nameToCopy._nameIndex;
     _parameterCount = nameToCopy._parameterCount;
     Kind            = nameToCopy.Kind;
     Prefix          = nameToCopy.Prefix;
     Postfix         = nameToCopy.Postfix;
 }
Esempio n. 2
0
 public AstSymbolName(AstName symbolName)
 {
     if (symbolName.Kind == AstNameKind.Canonical)
     {
         _native = _canonical = symbolName ?? throw new ArgumentNullException(nameof(symbolName));
     }
     else
     {
         _native    = symbolName ?? throw new ArgumentNullException(nameof(symbolName));
         _canonical = symbolName.ToCanonical();
     }
 }
Esempio n. 3
0
        /// <summary>Parse a local source code or external symbol name.</summary>
        public static AstSymbolName Parse(string symbolName, AstNameKind nameKind = AstNameKind.Local)
        {
            var native = AstName.ParseFullName(symbolName, nameKind);

            return(new AstSymbolName(native));
        }
Esempio n. 4
0
 public AstSymbolName(AstSymbolName nameToCopy)
 {
     _native    = new AstName(nameToCopy.NativeName);
     _canonical = new AstName(nameToCopy.CanonicalName);
 }
 public AstTypeReferenceExternal(TypeMetadata typeReference)
 {
     _typeReference = typeReference;
     _externalName = AstName.FromExternal(typeReference.Namespace, typeReference.Name);
 }
Esempio n. 6
0
 public AstIdentifier(string symbolName, AstIdentifierKind identifierKind)
     : this(AstName.ParseFullName(symbolName), identifierKind)
 {
 }
Esempio n. 7
0
 public AstIdentifier(AstName symbolName, AstIdentifierKind identifierKind)
     : this(new AstSymbolName(symbolName), identifierKind)
 {
 }