Skip to content

Commit

Permalink
Remove last few edge cases still using arrays instead of sexps
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 15, 2013
1 parent be34397 commit 7038303
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 deletions lib/opal/core_ext.rb
@@ -1,8 +1,3 @@
class Array
attr_accessor :line
attr_accessor :end_line
end

module Opal
class Sexp

Expand All @@ -18,6 +13,16 @@ def method_missing(sym, *args, &block)
@array.send sym, *args, &block
end

def <<(other)
@array << other
self
end

def push(*parts)
@array.push(*parts)
self
end

def to_ary
@array
end
Expand Down
4 changes: 2 additions & 2 deletions lib/opal/grammar.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/opal/grammar.y
Expand Up @@ -876,12 +876,12 @@ primary:
| CASE opt_terms case_body END
{
result = s(:case, nil, *val[2])
result.line = val[2].line
# result.line = val[2].line
}
| CASE opt_terms ELSE compstmt END
{
result = s(:case, nil, val[3])
result.line = val[3].line
# result.line = val[3].line
}
| FOR mlhs IN
{
Expand Down

0 comments on commit 7038303

Please sign in to comment.