rubinius-processor 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60f940b9249a761a40ab02df63d59b1420c90287
4
- data.tar.gz: ac61f60f005425c7387d42c73db90b0084893189
3
+ metadata.gz: a7e47c2c6e3eb256801931f102c2ac2f5a1fddd4
4
+ data.tar.gz: 391a1a226036b0e0673e4a14f23e110e3ce9525a
5
5
  SHA512:
6
- metadata.gz: c4d024faef19c57a395cf7c96c44906174e3f3400b9b473258fb81b29a6e9d44d6f19482bbf2ffe298897ad5d031a46e1390dacaccb43fa0da95e7b5c7157a35
7
- data.tar.gz: 078d5be9342d46230e94602235e605c515aa813002e35ae56a80177a3184798044adce2d3e9de025df2ab656cf00937eb073dd2bed93b6a1ae5532139e2e8d54
6
+ metadata.gz: fae09fdf988aa5525d4feeba1b56e6cffcf61ec1ffe3241ece3019a04d7984227bed67e15e5479aef24b6b4a6d3ab154c845f9f2fa94d243496948e562aa2bc5
7
+ data.tar.gz: cc428e86b8cde84ad88cce008a9f0ad5ded813360843ef0a806a807d5835fa83ef2ed9c0b850abffd4c61d62dff1de8007844ee7946809a1e07d0e7f63e3e57f
@@ -369,11 +369,11 @@ module Rubinius::ToolSets.current::ToolSet
369
369
  end
370
370
 
371
371
  def process_op_asgn1(line, receiver, index, op, value)
372
- AST::OpAssign1.new line, receiver, index, op, value
372
+ AST::OpAssignElement.new line, receiver, index, op, value
373
373
  end
374
374
 
375
375
  def process_op_asgn2(line, receiver, name, op, value)
376
- AST::OpAssign2.new line, receiver, name, op, value
376
+ AST::OpAssignAttribute.new line, receiver, name, op, value
377
377
  end
378
378
 
379
379
  def process_op_asgn_and(line, var, value)
@@ -513,145 +513,4 @@ module Rubinius::ToolSets.current::ToolSet
513
513
  AST::ZSuper.new line
514
514
  end
515
515
  end
516
-
517
- class Melbourne19 < Melbourne
518
- def process_args(line, required, optional, splat, post, block)
519
- AST::FormalArguments19.new line, required, optional, splat, post, block
520
- end
521
-
522
- def process_block_pass(line, arguments, body)
523
- AST::BlockPass19.new line, arguments, body
524
- end
525
-
526
- def process_encoding(line, name)
527
- AST::Encoding.new line, name
528
- end
529
-
530
- def process_postarg(line, into, rest)
531
- AST::PostArg.new line, into, rest
532
- end
533
-
534
- def process_iter(line, method_send, scope)
535
- ary = scope && scope.array || []
536
- arguments = nil
537
-
538
- if ary.first.kind_of? AST::FormalArguments
539
- arguments = scope.array.shift
540
- end
541
-
542
- unless arguments
543
- arguments = AST::FormalArguments19.new line, nil, nil, nil, nil, nil
544
- end
545
-
546
- case ary.size
547
- when 0
548
- body = nil
549
- when 1
550
- if scope.locals
551
- body = scope
552
- else
553
- body = scope.array.shift
554
- end
555
- else
556
- body = scope
557
- end
558
-
559
- method_send.block = AST::Iter19.new line, arguments, body
560
- method_send
561
- end
562
-
563
- def process_for(line, iter, arguments, body)
564
- send = AST::Send.new line, iter, :each
565
- send.block = AST::For19.new line, arguments, body
566
- send
567
- end
568
-
569
- def process_lambda(line, scope)
570
- arguments = scope.array.shift
571
- if scope.array.size == 1
572
- body = scope.array.shift
573
- else
574
- body = scope
575
- end
576
-
577
- receiver = AST::Self.new line
578
- method_send = AST::Send.new line, receiver, :lambda, true
579
-
580
- method_send.block = AST::Iter19.new line, arguments, body
581
- method_send
582
- end
583
-
584
- def process_number(line, value)
585
- case value
586
- when Fixnum
587
- AST::FixnumLiteral.new line, value
588
- when Bignum
589
- AST::NumberLiteral.new line, value
590
- end
591
- end
592
-
593
- def process_op_asgn_or(line, var, value)
594
- AST::OpAssignOr19.new line, var, value
595
- end
596
-
597
- def process_opt_arg(line, arguments)
598
- AST::Block.new line, arguments
599
- end
600
-
601
- def process_postexe(line, body)
602
- node = AST::Send.new line, AST::Self.new(line), :at_exit, true
603
- node.block = AST::Iter.new line, nil, body
604
- node
605
- end
606
-
607
- def process_preexe(line, body)
608
- node = AST::PreExe19.new line
609
- node.block = AST::Iter19.new line, nil, body
610
- add_pre_exe node
611
- node
612
- end
613
-
614
- def process_scope(line, arguments, body, locals)
615
- case body
616
- when AST::Begin
617
- if body.rescue.kind_of? AST::NilLiteral
618
- return nil unless arguments
619
- end
620
- body = AST::Block.new line, [body.rescue]
621
- when AST::Block
622
- ary = body.array
623
- if ary.size > 1 and
624
- ary.first.kind_of?(AST::Begin) and
625
- ary.first.rescue.kind_of?(AST::NilLiteral)
626
- ary.shift
627
- end
628
- when nil
629
- # Nothing
630
- else
631
- body = AST::Block.new line, [body]
632
- end
633
-
634
- if arguments and body
635
- body.array.unshift arguments
636
- end
637
-
638
- body.locals = locals if locals
639
-
640
- body
641
- end
642
-
643
- def process_super(line, arguments)
644
- if arguments.kind_of? AST::BlockPass
645
- block = arguments
646
- arguments = block.arguments
647
- block.arguments = nil
648
- else
649
- block = nil
650
- end
651
-
652
- node = AST::Super.new line, arguments
653
- node.block = block
654
- node
655
- end
656
- end
657
516
  end
@@ -1,5 +1,5 @@
1
1
  module Rubinius::ToolSets.current::ToolSet
2
2
  class Processor
3
- VERSION = "1.1.1"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubinius-processor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-18 00:00:00.000000000 Z
11
+ date: 2014-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
- version_requirements: !ruby/object:Gem::Requirement
15
+ requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
- requirement: !ruby/object:Gem::Requirement
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
21
23
  requirements:
22
24
  - - "~>"
23
25
  - !ruby/object:Gem::Version
24
26
  version: '1.3'
25
- prerelease: false
26
- type: :development
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- version_requirements: !ruby/object:Gem::Requirement
29
+ requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
- requirement: !ruby/object:Gem::Requirement
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
35
37
  requirements:
36
38
  - - "~>"
37
39
  - !ruby/object:Gem::Version
38
40
  version: '10.0'
39
- prerelease: false
40
- type: :development
41
41
  description: Converts Melbourne parse tree into an AST.
42
42
  email:
43
43
  - brixen@gmail.com
@@ -79,4 +79,3 @@ signing_key:
79
79
  specification_version: 4
80
80
  summary: Converts Melbourne parse tree into an AST.
81
81
  test_files: []
82
- has_rdoc: