Brackets in strings
6 posts • Page 1 of 1
Brackets in strings
For some reason in Thyme, the strings "]", "}", and ")" are syntax errors, as you can see by typing them into the console.
Thymechanic
- immibis
- Posts: 87
- Joined: Wed Sep 30, 2009 12:24 am
Re: Brackets in strings
Do you mean when you put ) on its own it is an error or if you make an actually string like (...).
{} [] () are used for different things, you need the right tools for the job.
Post an example of your error.
{} [] () are used for different things, you need the right tools for the job.
Post an example of your error.
-

Mystery - Posts: 2802
- Joined: Thu Sep 03, 2009 1:16 pm
- Location: Southern Australia
Re: Brackets in strings
immibis wrote:For some reason in Thyme, the strings "]", "}", and ")" are syntax errors, as you can see by typing them into the console.
I don't think this is a problem, I don't think that there is any point in time where this would be required, because they are still usable in variables, one error for something that serves no use and doesn't influence anything, is something I don't think is a problem
For anyone who is interested, the errors are:
- Code: Select all
-- Warning: Exception thrown: line 1: Unexpected token: } from C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
-- Warning: Caught exception: line 1: Unexpected token: }, C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
Parse error: line 1: Unexpected token: }
This Warning is nothing to worry about in this case
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: Brackets in strings
No, I mean a string containing only one of those characters and nothing else. For example, "}" (including quote marks). If you type it in the console:
- Code: Select all
> "}"
-- Warning: Exception thrown: line 1: Unexpected token: } from C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
-- Warning: Caught exception: line 1: Unexpected token: }, C:\emilk\phun\trunk\Source\script\Parser.cpp:203: class util::SharedPtr<class script::CodeBlock> __thiscall script::Parser::Parse(const class std::vector<class script::Token,class std::allocator<class script::Token> > &, class util::SharedPtr<class script::Reflected>
Parse error: line 1: Unexpected token: }
Thymechanic
- immibis
- Posts: 87
- Joined: Wed Sep 30, 2009 12:24 am
Re: Brackets in strings
you could try putting a forward slash in front of it like this: "/{" I'm not a thyme expert but a forward slash is usually used in other languages to make the compiler or interpreter read special characters
- BoJaN4464
- Posts: 8
- Joined: Fri Sep 18, 2009 1:04 am
Re: Brackets in strings
You're thinking of backslashes. But "\}" is still a syntax error.
Thymechanic
- immibis
- Posts: 87
- Joined: Wed Sep 30, 2009 12:24 am
6 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest



