Skip to content

Scanners misinterpret -1 #79

Open
Open
@nathany

Description

@nathany

Most scanners scans expressions like -1 mistakenly as operator(-)integer(1) where it should be returning integer(-1). It's not easy to avoid expressions like i-1 getting highlighted as ident(i)operator(+)integer(1), but it's possible (see Ruby scanner).

I removed the recognition of -1 tokens in r255. This is only a hotfix; to really fix it, we need to keep track of some value_expected state. The Ruby Scanner can do this, and the Scanners for Java, C, Delphi, and Python will need it, too.

From Redmine: http://odd-eyed-code.org/issues/47

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions