예제 #1
0
            protected override object Read(PushbackTextReader r, char leftparen)
            {
                int line = -1;

                if (r is LineNumberingTextReader)
                {
                    line = ((LineNumberingTextReader)r).LineNumber;
                }
                IList <Object> list = readDelimitedList(')', r, true);

                if (list.Count == 0)
                {
                    return(PersistentList.EMPTY);
                }
                IObj s = (IObj)PersistentList.create((IList)list);

                //		IObj s = (IObj) RT.seq(list);
                if (line != -1)
                {
                    return(s.withMeta(RT.map(RT.LINE_KEY, line)));
                }
                else
                {
                    return(s);
                }
            }
예제 #2
0
            protected override object Read(PushbackTextReader r, char leftparen, object opts)
            {
                //int startLine = -1;
                //int startCol = -1;
                //LineNumberingTextReader lntr = r as LineNumberingTextReader;

                //if (lntr != null)
                //{
                //    startLine = lntr.LineNumber;
                //    startCol = lntr.ColumnNumber;
                //}
                IList <Object> list = ReadDelimitedList(')', r, true, opts);

                if (list.Count == 0)
                {
                    return(PersistentList.EMPTY);
                }
                IObj s = (IObj)PersistentList.create((IList)list);

                return(s);
            }