GithubHelp home page GithubHelp logo

Reject quoted local variables about inform6 HOT 2 CLOSED

erkyrath avatar erkyrath commented on August 23, 2024 1
Reject quoted local variables

from inform6.

Comments (2)

erkyrath avatar erkyrath commented on August 23, 2024

This should just be a matter of removing the if (token_type != DQ_TT) test in parse_routine().

from inform6.

erkyrath avatar erkyrath commented on August 23, 2024

Update: aaaaaaaaaagggghhhhhh.

Ignoring quotes is a general behavior of get_next_token() when dont_enter_into_symbol_table is true. Which means that this inconsistency turns up in lots of places! All of the following compile without error:

Switches v5;
Switches "v5";

Verb 'foo' * -> "Acting";

[ TestMe foo "bar";
    <"Acting">;
];

I think that's everywhere we parse a symbol with dont_enter_into_symbol_table set. (There's places where we use it but don't parse symbols, e.g., code that is #if'd out.)

It should be okay to reject quoted symbols in all of these cases. Except maybe the Strings directive? But that's explicitly deprecated now, with a warning.

Conclusion: I am going to remove this general behavior -- get_next_token() should distinguish between quoted strings and bare-strings. All the above cases will only accept bare-strings.

from inform6.

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.