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

[std] StringTools missing variants #417

Closed
eliasku opened this issue Feb 16, 2016 · 3 comments
Closed

[std] StringTools missing variants #417

eliasku opened this issue Feb 16, 2016 · 3 comments

Comments

@eliasku
Copy link
Contributor

eliasku commented Feb 16, 2016

Methods are missed for haxe std StringTools extension.
StringTools is very basic extension, and uncomfortable to use with current Intellij-Haxe version.
Methods are not available because one-lined style is used for conditional compilation.

Repro:

using StringTools;
class StdTodo {
    function parseStringTools() {
        var s = "";
        s.replace("3", " "); // Unresolved symbol, no completion
        StringTools.replace(s, "3", " ");// unresolved methods, no completion
    }
}

Why broken:
image

I agreed that one-line style for conditional compilation is very unreadable style, but Std library and a lot of external libraries are using it intensively.

Version: 0.9.9, IDEA 15, OSX
Related: one-line preprocessor, conditional compilation

@eliasku eliasku changed the title [std] using StringTools missing variants [std] StringTools missing variants Feb 16, 2016
@EBatTiVo
Copy link
Contributor

Yes. There are other bugs for this: #115, #29, #121. @as3boyan has tried to fix it in the past, and there is commented out code in the parser that tries to deal with it, though I think he never got it working right.

The trouble is that the elements can appear anywhere within a source file, so can't be inserted into the BNF. We had to settle for finding them at the beginning of the line. Even then, there are many issues around refactoring, find usage, etc. where we need to parse all of the paths and verify their syntax independently.

The simple (and typical) method of just treating the non-current path as comments does not account for those usage patterns.

@mayakwd
Copy link
Contributor

mayakwd commented Sep 26, 2017

Already fixed

@EricBishton
Copy link
Member

Fixed for 0.11.0 release.

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

No branches or pull requests

4 participants