Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/rkelly/tokenizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ class Tokenizer
const true false null debugger
}

# First 6 are always reserved in ECMAScript 5.1
# Others are only reserved in strict mode.
# http://www.ecma-international.org/ecma-262/5.1/#sec-7.6.1.2
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words
RESERVED = %w{
abstract boolean byte char class double enum export extends
final float goto implements import int interface long native package
private protected public short static super synchronized throws
transient volatile
class enum export extends import super

implements interface package private protected public static
let yield
}

LITERALS = {
Expand Down