Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain aggregate symbols cause problems in other aggregates #203

Closed
ben-reilly opened this issue May 7, 2014 · 4 comments
Closed

Certain aggregate symbols cause problems in other aggregates #203

ben-reilly opened this issue May 7, 2014 · 4 comments

Comments

@ben-reilly
Copy link

ben-reilly commented May 7, 2014

Somewhat similar to #202 (and by extension, #128), special symbols seem to not be parsed properly when used in an aggregate.
e.g.

* = Crate
@ = * and Target

gives the error

Something bad's happening in the LEGEND
@rmmh
Copy link
Contributor

rmmh commented Sep 1, 2014

not sure if this is a bug or a feature

special symbols can't be used to refer to objects in the rules section, so maybe just a better error message? ("objects can only be referred to by symbols in the levels section")

@increpare
Copy link
Owner

increpare commented Sep 1, 2014

i guess you should be allowed to refer to things by symbols/their names
wherever it's not ambiguous, right?

On Mon, Sep 1, 2014 at 4:04 AM, Ryan Hitchman notifications@github.com
wrote:

not sure if this is a bug or a feature

special symbols can't be used to refer to objects in the rules section, so
maybe just a better error message? ("objects can only be referred to by
symbols in the levels section")


Reply to this email directly or view it on GitHub
#203 (comment)
.

@increpare
Copy link
Owner

increpare commented Feb 22, 2017

need to do #375 first - the system right now can't handle chains of definitions, so even if I allow the compiler to parse this it will get confused.

@increpare
Copy link
Owner

increpare commented Jul 29, 2021

So I thought about this, and I managed to implement support for it that didn't break the tests. However, I feel like it's not something I want to support? The small but definite chance of this change randomly breaking someone's game isn't maybe worth allowing people to code in a coding style I'm not too hot for - the randomo symbols are enabled chiefly for the map editor. I just see lots of nasty edge cases coming up if I add this feature and anyone actually uses it. So better that people encounter errors sooner rather than later ^^ (but a better error message may be nice)

(
the change involved introducing the following regexps in key places:
var reg_name_simple = /[\p{L}\p{N}]+[\p{Z}\s]/u;///\w[a-uw-zA-UW-Z0-9]/;
var reg_name = /((?![(])[\p{L}\p{N}\p{P}\p{S}])+[\p{Z}\s]/u;///\w[a-uw-zA-UW-Z0-9_]/;
var reg_name_nocomma = /((?![(,])[\p{L}\p{N}\p{P}\p{S}])+[\p{Z}\s]/u;///\w[a-uw-zA-UW-Z0-9_]/;

image

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants