parent
440a2ac22a
commit
988f5ca7d5
@ -25,6 +25,14 @@ describe('parser/javascript/root.js', function() {
|
|||||||
flags: ['Multiline'],
|
flags: ['Multiline'],
|
||||||
regexp: jasmine.objectContaining({ textValue: 'test' })
|
regexp: jasmine.objectContaining({ textValue: 'test' })
|
||||||
},
|
},
|
||||||
|
'/test/y': {
|
||||||
|
flags: ['Sticky'],
|
||||||
|
regexp: jasmine.objectContaining({ textValue: 'test' })
|
||||||
|
},
|
||||||
|
'/test/u': {
|
||||||
|
flags: ['Unicode'],
|
||||||
|
regexp: jasmine.objectContaining({ textValue: 'test' })
|
||||||
|
},
|
||||||
'/test/mgi': {
|
'/test/mgi': {
|
||||||
flags: ['Global', 'Ignore Case', 'Multiline'],
|
flags: ['Global', 'Ignore Case', 'Multiline'],
|
||||||
regexp: jasmine.objectContaining({ textValue: 'test' })
|
regexp: jasmine.objectContaining({ textValue: 'test' })
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
grammar JavascriptRegexp
|
grammar JavascriptRegexp
|
||||||
root <- ( ( "/" regexp "/" flags:[igm]* ) / regexp flags:""? ) <Root>
|
root <- ( ( "/" regexp "/" flags:[yigmu]* ) / regexp flags:""? ) <Root>
|
||||||
regexp <- match:match alternates:( "|" match )* <Regexp>
|
regexp <- match:match alternates:( "|" match )* <Regexp>
|
||||||
match <- (!repeat) parts:match_fragment* <Match>
|
match <- (!repeat) parts:match_fragment* <Match>
|
||||||
anchor <- ( "^" / "$" ) <Anchor>
|
anchor <- ( "^" / "$" ) <Anchor>
|
||||||
|
@ -9,7 +9,9 @@ export default {
|
|||||||
flagLabels: {
|
flagLabels: {
|
||||||
i: 'Ignore Case',
|
i: 'Ignore Case',
|
||||||
g: 'Global',
|
g: 'Global',
|
||||||
m: 'Multiline'
|
m: 'Multiline',
|
||||||
|
y: 'Sticky',
|
||||||
|
u: 'Unicode'
|
||||||
},
|
},
|
||||||
|
|
||||||
// Renders the root into the currently set container.
|
// Renders the root into the currently set container.
|
||||||
|
Loading…
Reference in New Issue
Block a user