LispEngine.Parsing.Parser.parseSymbol C# (CSharp) Метод

parseSymbol() приватный статический Метод

private static parseSymbol ( string identifier ) : Datum
identifier string
Результат Datum
        private static Datum parseSymbol(string identifier)
        {
            // "." has "higher" precedence than "/"
            // so
            // a.b/c is parsed into
            // (slash (dot a b))
            // rather than
            // (dot (a (slash b c)))
            // We only expand slash if it's actually separating
            // something else. Standalone slash stays as is.
            var slashSplit = identifier.Split('/');
            if(slashSplit.Length > 1 && slashSplit.Any(c => c.Length > 0))
                return buildSymbolForm(slash, slashSplit);
            var split = identifier.Split('.');
            if (split.Length > 1)
                return buildSymbolForm(dot, split);
            return symbol(identifier);
        }