mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
first step towards requiring #{ ... } interpolation -- removing naked interps from the compiler.
This commit is contained in:
@@ -32,8 +32,8 @@ unwrap = /function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/
|
||||
# previous nonterminal.
|
||||
o = (patternString, action, options) ->
|
||||
return [patternString, '$$ = $1;', options] unless action
|
||||
action = if match = (action + '').match(unwrap) then match[1] else "(#action())"
|
||||
[patternString, "$$ = #action;", options]
|
||||
action = if match = (action + '').match(unwrap) then match[1] else "(#{action}())"
|
||||
[patternString, "$$ = #{action};", options]
|
||||
|
||||
# Grammatical Rules
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user