Exemplo n.º 1
0
        private NameNode ParseDirectiveLocation(ParserContext context)
        {
            SyntaxToken start = context.Current;
            NameNode    name  = context.ParseName();

            if (DirectiveLocation.IsValidName(name.Value))
            {
                return(name);
            }
            throw context.Unexpected(start);
        }
        private NameNode ParseDirectiveLocation()
        {
            TokenKind kind = _reader.Kind;
            NameNode  name = ParseName();

            if (DirectiveLocation.IsValidName(name.Value))
            {
                return(name);
            }

            throw Unexpected(kind);
        }
 public static bool TryParse(string value, out DirectiveLocation location)
 {
     return(_locations.TryGetValue(value, out location));
 }