Giter Club home page Giter Club logo

Comments (6)

motemen avatar motemen commented on September 28, 2024

It's because gore enters line-continuation mode if it fails to parse input. What is your expected behavior?

As you may already know, for string literals you must surround them by "s:

gore> "hello\t"
"hello\t"

from gore.

samertm avatar samertm commented on September 28, 2024

It's because gore enters line-continuation mode if it fails to parse input. What is your expected behavior?

That explains it :P I was expecting an error.

from gore.

motemen avatar motemen commented on September 28, 2024

Got the point. I have currently no idea with this problem.

from gore.

samertm avatar samertm commented on September 28, 2024

The reason I ask is because I'm writing a CLI app too, and I wanted to see how you handle backslashes. For my app, all backslashes outside of quotes are literals, and backslashes within quotes always escape the character after, which you can see here. Where do you parse CLI input? I'd like to take a look.

from gore.

motemen avatar motemen commented on September 28, 2024

One night passed and I think we can use go/scanner to detect illegal characters in the source, though I have not tested it.

FYI, I'm parsing input using go/parser.ParseFile here and if the error was go/scanner.ErrorList, gore prompts to continue line here.

from gore.

itchyny avatar itchyny commented on September 28, 2024

This issue is resolved now.

from gore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.