ββOn Wed, Oct 5, 2016 at 6:21 AM, Edward K. Ream <[email protected]>
wrote:
> The new code hasn't been upped yet. There are a few bugs remaining, but
> already the new base is a more robust and flexible way of handling the
> myriad complexities of javascript.
>
β5d2dadd contains the new code, enabled because new_scanner = True.
I'll be working on it today. It's buggy, but already it does better than
the old code.
I am dithering about whether to start blocks when *square *brackets are
unbalanced. The present code doesn't, but there are patterns in that
involve a list of function names. The pattern:
r'(\s*)define(\s*)\((.*),(\s*)function(\*s)\('
uses (.*) to handle such patterns, but the pattern won't match across
newlines at present, so that's not going to help in the wild.
*To do*
1. At present, the perfect import checks complain if the @others directives
are indented, as they should be. Indentation doesn't typically matter in
javascript, so I think those strict checks should be disabled.
2. Rescanned blocks should be unindented to match the indent in the parent
@others.
3. The code must make sure that no node contains multiple @others
directives. Not sure this possible, but it probably is...
4. Given the importance of the regex patterns, it would be good to allow
the user to specify them like this:
@data javascript_importer_patterns
prefix: func
id: 3
pattern: r'(\s*)function(\s+)(\w+)'
multiline: false
...
Anyway, this is a happy new playground, and good things are coming.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.