add js comment type

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-09-24 19:55:34 -04:00
parent 4643bf3d61
commit adb3ed688b
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ word = chr1 + chr2 + '*'
class JavascriptGrammar(Grammar): class JavascriptGrammar(Grammar):
rules = [ rules = [
PatternRule('comment', '//.*$'), PatternRule('comment', '//.*$'),
RegionRule('comment', '/\*', Grammar, '\*/'), RegionRule('comment', r'/\*', Grammar, '\*/'),
RegionRule('comment', r'<!--', Grammar, '-->'),
PatternRule('continuation', r'\\(?= *$)'), PatternRule('continuation', r'\\(?= *$)'),
PatternMatchRule('x', '(function)( +)(' + word + ')', PatternMatchRule('x', '(function)( +)(' + word + ')',