Bug 49271 - PatternCharacter/CharacterClass ranges should be SyntaxErrors
Summary: PatternCharacter/CharacterClass ranges should be SyntaxErrors
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: https://bugzilla.mozilla.org/show_bug...
Depends on:
Reported: 2010-11-09 12:38 PST by Chris Leary
Modified: 2012-03-12 01:07 PDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Chris Leary 2010-11-09 12:38:37 PST
See https://bugzilla.mozilla.org/show_bug.cgi?id=576837#c2

Steps: /[C-\s]/
Expected: SyntaxError

Note that character-class/character-class range syntax like /[\s-\w]/ is accepted by the SpiderMonkey engine as an extension.
Comment 1 Gavin Barraclough 2012-03-12 01:07:22 PDT
This is required for web compatibility, and permitted by the spec under section 2.

cheers, G.