mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
first draft at ticket #437 ... automatic quoting of reserved words and keywords.
This commit is contained in:
@@ -474,13 +474,14 @@ exports.AccessorNode: class AccessorNode extends BaseNode
|
||||
|
||||
constructor: (name, tag) ->
|
||||
@name: name
|
||||
@prototype: tag is 'prototype'
|
||||
@prototype: if tag is 'prototype' then '.prototype' else ''
|
||||
@soakNode: tag is 'soak'
|
||||
|
||||
compileNode: (o) ->
|
||||
name: @name.compile o
|
||||
o.chainRoot.wrapped: or @soakNode
|
||||
protoPart: if @prototype then 'prototype.' else ''
|
||||
".$protoPart${@name.compile(o)}"
|
||||
namePart: if name.match(IS_STRING) then "[$name]" else ".$name"
|
||||
@prototype + namePart
|
||||
|
||||
#### IndexNode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user