rubymacros 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -0
  2. data/COPYING.LGPL +503 -158
  3. data/History.txt +115 -5
  4. data/Makefile +68 -0
  5. data/README.txt +29 -6
  6. data/TODO +1 -0
  7. data/bin/macroruby +69 -0
  8. data/example/__dir__.rb +18 -0
  9. data/example/__dir___wrap.rb +18 -0
  10. data/example/andand.rb +18 -0
  11. data/example/andand_wrap.rb +18 -0
  12. data/example/assert.rb +29 -8
  13. data/example/assert0.rb +11 -0
  14. data/example/assert0_wrap.rb +5 -0
  15. data/example/assert_does_nothing_when_disabled.rb +19 -0
  16. data/example/assert_wrap.rb +21 -0
  17. data/example/expected_output.txt +88 -0
  18. data/example/formless_macro.rb +123 -0
  19. data/example/formless_macro_wrap.rb +20 -0
  20. data/example/inline.rb +97 -0
  21. data/example/linenum.rb +19 -1
  22. data/example/linenum_user.rb +18 -0
  23. data/example/linenum_wrap.rb +18 -0
  24. data/example/loop.rb +18 -0
  25. data/example/loop_wrap.rb +18 -0
  26. data/example/meta.rb +25 -0
  27. data/example/meta_wrap.rb +20 -0
  28. data/example/nilresult.rb +26 -0
  29. data/example/nilresult_wrap.rb +21 -0
  30. data/example/pipeline.rb +37 -0
  31. data/example/rescuing.rb +33 -0
  32. data/example/rescuing_wrap.rb +21 -0
  33. data/example/role.rb +103 -0
  34. data/example/role_with_eval.rb +92 -0
  35. data/example/self_in_class.rb +27 -0
  36. data/example/separated_scope.rb +42 -0
  37. data/example/separated_scope_wrap.rb +20 -0
  38. data/example/simple.rb +18 -0
  39. data/example/simple_wrap.rb +18 -0
  40. data/example/unproc.rb +31 -0
  41. data/example/unproc_wrap.rb +21 -0
  42. data/example/unroll.rb +34 -0
  43. data/example/unroll_macros.rb +119 -0
  44. data/example/unroll_wrap.rb +22 -0
  45. data/example/with.rb +50 -7
  46. data/example/with_wrap.rb +19 -0
  47. data/lib/macro.rb +307 -72
  48. data/lib/macro/ReduceWithsFor_RedParse_RedParse__MacroMixin_RedParse__WithMacros_1_8.rb +18880 -0
  49. data/lib/macro/ReduceWithsFor_RedParse_RedParse__MacroMixin_RedParse__WithMacros_1_9.rb +19101 -0
  50. data/lib/macro/form.rb +136 -27
  51. data/lib/macro/node.rb +64 -0
  52. data/lib/macro/version.rb +2 -5
  53. data/lib/rubymacros.rb +19 -0
  54. data/lib/rubymacros/version.rb +23 -0
  55. data/lib/weakkeyhash.rb +18 -0
  56. data/rubymacros.gemspec +60 -0
  57. data/test/test_all.rb +27 -2
  58. data/test/test_examples.rb +91 -0
  59. data/test/test_expand.rb +56 -1
  60. data/test/test_form.rb +108 -10
  61. data/test/test_unroll.rb +120 -0
  62. metadata +93 -65
  63. data/Rakefile +0 -37
metadata CHANGED
@@ -1,102 +1,130 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rubymacros
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Caleb Clausen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2009-07-07 00:00:00 -07:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
16
14
  name: redparse
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
21
17
  - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 0.8.2
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: hoe
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
31
24
  - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.12.2
34
- version:
35
- description: RubyMacros is a lisp-like macro pre-processor for Ruby. More than just a purely textual substitution scheme, RubyMacros can manipulate and morph Ruby parse trees (in the form of RedParse Nodes) at parse time in just about any way you see fit. Macros are programmed in ruby itself. And since parse trees are represented in RedParse format, they're easier to use (programatically) and more object-oriented than other available ruby parsetree formats. (RedParse Node format is actually designed to be straightforward to use and to represent the structure of ruby source code very closely.) ==
36
- email: rubymacros-owner @at@ inforadical .dot. net
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0
27
+ description: "RubyMacros is a lisp-like macro pre-processor for Ruby. More than just
28
+ a \npurely textual substitution scheme, RubyMacros can manipulate and morph \nRuby
29
+ parse trees (in the form of RedParse Nodes) at parse time in just about \nany way
30
+ you see fit. \n\nMacros are programmed in ruby itself. And since parse trees are
31
+ represented \nin RedParse format, they're easier to use (programatically) and more
32
+ object-\noriented than other available ruby parsetree formats. (RedParse Node format
33
+ \nis actually designed to be straightforward to use and to represent the \nstructure
34
+ of ruby source code very closely.)"
35
+ email: caleb (at) inforadical (dot) net
37
36
  executables: []
38
-
39
37
  extensions: []
40
-
41
- extra_rdoc_files:
42
- - Manifest.txt
38
+ extra_rdoc_files:
43
39
  - README.txt
44
- - History.txt
45
- files:
46
40
  - COPYING.LGPL
41
+ files:
42
+ - COPYING.LGPL
43
+ - History.txt
44
+ - Makefile
47
45
  - Manifest.txt
48
46
  - README.txt
49
- - History.txt
50
- - Rakefile
51
- - test/test_form.rb
52
- - test/test_expand.rb
53
- - lib/macro.rb
54
- - lib/macro/form.rb
55
- - lib/macro/version.rb
47
+ - TODO
48
+ - bin/macroruby
49
+ - example/__dir__.rb
50
+ - example/__dir___wrap.rb
56
51
  - example/andand.rb
52
+ - example/andand_wrap.rb
57
53
  - example/assert.rb
54
+ - example/assert0.rb
55
+ - example/assert0_wrap.rb
56
+ - example/assert_does_nothing_when_disabled.rb
58
57
  - example/assert_wrap.rb
59
- - example/__dir__.rb
60
- - example/__dir___wrap.rb
58
+ - example/expected_output.txt
59
+ - example/formless_macro.rb
60
+ - example/formless_macro_wrap.rb
61
+ - example/inline.rb
62
+ - example/linenum.rb
63
+ - example/linenum_user.rb
64
+ - example/linenum_wrap.rb
61
65
  - example/loop.rb
62
66
  - example/loop_wrap.rb
67
+ - example/meta.rb
68
+ - example/meta_wrap.rb
69
+ - example/nilresult.rb
70
+ - example/nilresult_wrap.rb
71
+ - example/pipeline.rb
72
+ - example/rescuing.rb
73
+ - example/rescuing_wrap.rb
74
+ - example/role.rb
75
+ - example/role_with_eval.rb
76
+ - example/self_in_class.rb
77
+ - example/separated_scope.rb
78
+ - example/separated_scope_wrap.rb
63
79
  - example/simple.rb
64
80
  - example/simple_wrap.rb
81
+ - example/unproc.rb
82
+ - example/unproc_wrap.rb
83
+ - example/unroll.rb
84
+ - example/unroll_macros.rb
85
+ - example/unroll_wrap.rb
65
86
  - example/with.rb
66
87
  - example/with_wrap.rb
67
- - example/linenum.rb
68
- - example/linenum_user.rb
69
- - example/linenum_wrap.rb
70
- - example/andand_wrap.rb
88
+ - lib/macro.rb
89
+ - lib/macro/ReduceWithsFor_RedParse_RedParse__MacroMixin_RedParse__WithMacros_1_8.rb
90
+ - lib/macro/ReduceWithsFor_RedParse_RedParse__MacroMixin_RedParse__WithMacros_1_9.rb
91
+ - lib/macro/form.rb
92
+ - lib/macro/node.rb
93
+ - lib/macro/version.rb
94
+ - lib/rubymacros.rb
95
+ - lib/rubymacros/version.rb
71
96
  - lib/weakkeyhash.rb
97
+ - rubymacros.gemspec
72
98
  - test/test_all.rb
73
- - TODO
74
- has_rdoc: true
75
- homepage: http://github.com/coatl/rubymacros/
99
+ - test/test_examples.rb
100
+ - test/test_expand.rb
101
+ - test/test_form.rb
102
+ - test/test_unroll.rb
103
+ homepage: http://github.com/coatl/rubymacros
104
+ licenses:
105
+ - LGPL-2.1
106
+ metadata: {}
76
107
  post_install_message:
77
- rdoc_options:
78
- - --main
108
+ rdoc_options:
109
+ - "--main"
79
110
  - README.txt
80
- require_paths:
111
+ require_paths:
81
112
  - lib
82
- required_ruby_version: !ruby/object:Gem::Requirement
83
- requirements:
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
84
115
  - - ">="
85
- - !ruby/object:Gem::Version
86
- version: "0"
87
- version:
88
- required_rubygems_version: !ruby/object:Gem::Requirement
89
- requirements:
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
90
120
  - - ">="
91
- - !ruby/object:Gem::Version
92
- version: "0"
93
- version:
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
94
123
  requirements: []
95
-
96
124
  rubyforge_project: rubymacros
97
- rubygems_version: 1.3.1
125
+ rubygems_version: 2.5.1
98
126
  signing_key:
99
127
  specification_version: 2
100
128
  summary: RubyMacros is a lisp-like macro pre-processor for Ruby.
101
- test_files:
129
+ test_files:
102
130
  - test/test_all.rb
data/Rakefile DELETED
@@ -1,37 +0,0 @@
1
- # Copyright (C) 2008 Caleb Clausen
2
- # Distributed under the terms of Ruby's license.
3
- require 'rubygems'
4
- require 'hoe'
5
-
6
-
7
- if $*==["test"]
8
- #hack to get 'rake test' to stay in one process
9
- #which keeps netbeans happy
10
- $:<<"lib"
11
- $:<<"../redparse/lib" #hack hack hack
12
- require 'redparse'
13
- require "test/test_all.rb"
14
- Test::Unit::AutoRunner.run
15
- exit
16
- end
17
-
18
- require 'lib/macro/version.rb'
19
-
20
- readme=open("README.txt")
21
- readme.readline("\n== DESCRIPTION:")
22
- desc=readme.readline("\n==")
23
-
24
- hoe=Hoe.new("rubymacros", Macro::VERSION) do |_|
25
- _.author = "Caleb Clausen"
26
- _.email = "rubymacros-owner @at@ inforadical .dot. net"
27
- _.url = ["http://github.com/coatl/rubymacros/", "http://rubyforge.org/projects/rubymacros/"]
28
- _.extra_deps << ['redparse', '>= 0.8.2']
29
- _.test_globs=["test/*"]
30
- _.description=desc
31
- _.summary=desc[/\A[^.]+\./]
32
- # _.spec_extras={:bindir=>''}
33
- # _.rdoc_pattern=/\A(README\.txt|lib\/.*\.rb)\Z/
34
- _.remote_rdoc_dir="/"
35
- end
36
-
37
-