Ejemplo 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;
 }
Ejemplo 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();
     }
 }
Ejemplo 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));
        }
Ejemplo 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);
 }
Ejemplo n.º 6
0
 public AstIdentifier(string symbolName, AstIdentifierKind identifierKind)
     : this(AstName.ParseFullName(symbolName), identifierKind)
 {
 }
Ejemplo n.º 7
0
 public AstIdentifier(AstName symbolName, AstIdentifierKind identifierKind)
     : this(new AstSymbolName(symbolName), identifierKind)
 {
 }