Coder Social home page Coder Social logo

Allow ending parameter token about hoard HOT 6 CLOSED

hyde46 avatar hyde46 commented on May 25, 2024 1
Allow ending parameter token

from hoard.

Comments (6)

Hyde46 avatar Hyde46 commented on May 25, 2024 1

After giving it some thought, I'd prefer a separate terminating token.
In a case like cmd #first#second it's too ambiguous whether #first# is a single command, and second part of the command, or #first and #second being two separate commands.
For now i'll go with ! as a terminating name token, only relevant if preceeded by # and a random string of characters without a space.

from hoard.

nazdridoy avatar nazdridoy commented on May 25, 2024 1

possible new rules:

  1. If there is a \ ignore the special behavior of the next character (disabling \ # and !).
  2. If a # is found without escape look for ! and substitute #foo bar foobar! with user input foo bar enabling multi-word named token (more readability)
  3. if no ! after # or no # before ! ignore their special behavior. ( for redundancy, fail safe and convenience)

from hoard.

Hyde46 avatar Hyde46 commented on May 25, 2024 1

Now part of release 1.1.1 🚀
Thanks for the suggestion. Will add escaping characters for the next smaller release

from hoard.

Hyde46 avatar Hyde46 commented on May 25, 2024

Good point!
I like the same parameter token suffix rule as an additional option to mark the ending of a parameter to replace!

from hoard.

nazdridoy avatar nazdridoy commented on May 25, 2024

I think that'd be perfect. Btw, If you could add an escape character like \, it'd be very useful. Then we will be able to escape \#, \! or itself \\ if we need to. Having a escape character can potentially become a simple escape route form many syntax errors.

from hoard.

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.