Giter Site home page Giter Site logo

Comments (2)

TheComet avatar TheComet commented on September 26, 2024

I'm unable to create a test case to reproduce this behavior. The following test passes:

TEST_F(NAME, command_name_inside_command)
{
    cmdIndex.addCommand(new cmd::Command(nullptr, "text", "", cmd::Command::Type::Void, {}));
    cmdIndex.addCommand(new cmd::Command(nullptr, "set text font", "", cmd::Command::Type::Void, {}));
    cmdIndex.addCommand(new cmd::Command(nullptr, "center text", "", cmd::Command::Type::Void, {}));
    cmdIndex.addCommand(new cmd::Command(nullptr, "wait key", "", cmd::Command::Type::Void, {}));
    matcher.updateFromIndex(&cmdIndex);
    ast = driver->parseString("test",
        "set text font \"Arial\"\n"
        "text 20, 20, \"Hello\"\n"
        "center text 200, 200, \"Centered\"\n"
        "wait key\n");
    ASSERT_THAT(ast, NotNull());
}
./odbc_tests --gtest_filter="db_parser_command.command_name_inside_command"
Note: Google Test filter = db_parser_command.command_name_inside_command
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from db_parser_command
[ RUN      ] db_parser_command.command_
[       OK ] db_parser_command.command_ (1 ms)
[----------] 1 test from db_parser_command (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1 ms total)
[  PASSED  ] 1 test.

Can you verify that those 3 text commands are loaded?

./odbc --dump-cmd-names | grep text

from opendarkbasic.

dgavedissian avatar dgavedissian commented on September 26, 2024

OK, now I'm very confused. I ran the --dump-cmd-names command, it dumped 1633 commands, and it appears that there are no "text" commands whatsoever, plus "ink foreground" and "ink background" is also missing. Perhaps it's not a parser problem then, will dig further.

from opendarkbasic.

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.