Пример #1
0
        private static PyObject <string> GetPythonString(
            SourcePositionedObject <string> prefix,
            SourcePositionedObject <string> content
            )
        {
            var str = GetPythonString(prefix.Value, content.Value);

            return(new PyObject <string>(str,
                                         prefix.StartInInput,
                                         content.EndInInput - prefix.StartInInput));
        }
Пример #2
0
 private static PyObject <double> ToPyObject(SourcePositionedObject <string> expr)
 => new PyObject <double>(double.Parse(expr.Value.Replace("_", "")),
                          expr.StartInInput,
                          expr.LengthInInput);