rsyntaxtree 1.0.1 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.tags +8 -40
- data/lib/rsyntaxtree/element.rb +1 -1
- data/lib/rsyntaxtree/string_parser.rb +0 -3
- data/lib/rsyntaxtree/svg_graph.rb +2 -1
- data/lib/rsyntaxtree/version.rb +1 -1
- data/lib/rsyntaxtree.rb +1 -1
- data/syntree.png +0 -0
- data/syntree.svg +24 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e607ace251c646cc6fb11c4eac44834afc4dd6989ce4433b2f511f1bf8df2329
|
4
|
+
data.tar.gz: 495e68852573a083b6352a7809622ef453926738dbb02f03d93220e12bac66e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5998d2729ec817aaadb60ac773acf9c846bd7d624bbb650e9e8dfb3c66e35300ae6ba6887d3cf5dfe1a45e1394fe64ce7b4ce64bfe3bfd8a73581d1c8cffafd2
|
7
|
+
data.tar.gz: 354536b8f8ea955b3acad905ed9b185be1876f7da37f114c0e55753fa870dab1ec98587b5a163e97680e51c6361b861f302ed3b4b8b053b8c6171aa526108f6d
|
data/.tags
CHANGED
@@ -8,22 +8,21 @@
|
|
8
8
|
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
|
9
9
|
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
|
10
10
|
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
|
11
|
-
!_TAG_PROGRAM_VERSION 5.9.0 /
|
11
|
+
!_TAG_PROGRAM_VERSION 5.9.0 /58c0e68a/
|
12
12
|
Author README.md /^### Author$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
13
13
|
BaseGraph lib/rsyntaxtree/base_graph.rb /^ class BaseGraph$/;" c class:RSyntaxTree
|
14
14
|
BaseGraph lib/rsyntaxtree/base_graph.rb /^ class BaseGraph$/;" c module:RSyntaxTree
|
15
15
|
Development README.md /^### Development$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
16
|
-
ETYPE_LEAF lib/rsyntaxtree.rb /^
|
17
|
-
ETYPE_NODE lib/rsyntaxtree.rb /^
|
16
|
+
ETYPE_LEAF lib/rsyntaxtree.rb /^ETYPE_LEAF = 2$/;" C
|
17
|
+
ETYPE_NODE lib/rsyntaxtree.rb /^ETYPE_NODE = 1$/;" C
|
18
18
|
Element lib/rsyntaxtree/element.rb /^ class Element$/;" c class:RSyntaxTree
|
19
19
|
Element lib/rsyntaxtree/element.rb /^ class Element$/;" c module:RSyntaxTree
|
20
20
|
ElementList lib/rsyntaxtree/elementlist.rb /^ class ElementList$/;" c class:RSyntaxTree
|
21
21
|
ElementList lib/rsyntaxtree/elementlist.rb /^ class ElementList$/;" c module:RSyntaxTree
|
22
22
|
Example README.md /^### Example$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
23
|
-
FONT_DIR lib/rsyntaxtree.rb /^
|
24
|
-
FONT_SCALING lib/rsyntaxtree.rb /^
|
23
|
+
FONT_DIR lib/rsyntaxtree.rb /^FONT_DIR = File.expand_path(File.dirname(__FILE__) + "\/..\/fonts")$/;" C
|
24
|
+
FONT_SCALING lib/rsyntaxtree.rb /^FONT_SCALING = 2$/;" C
|
25
25
|
FontMetrics lib/rsyntaxtree/utils.rb /^module FontMetrics$/;" m
|
26
|
-
HEIGHT_CONNECTOR_TO_TEXT lib/rsyntaxtree.rb /^ HEIGHT_CONNECTOR_TO_TEXT = 15$/;" C module:RSyntaxTree
|
27
26
|
Installation README.md /^### Installation$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
28
27
|
License README.md /^### License$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
29
28
|
Markup lib/rsyntaxtree/markup_parser.rb /^module Markup$/;" m
|
@@ -31,11 +30,7 @@ MarkupParser lib/rsyntaxtree/markup_parser.rb /^class MarkupParser < Parslet::Pa
|
|
31
30
|
MarkupParserTest test/markup_parser_test.rb /^class MarkupParserTest < Minitest::Test$/;" c
|
32
31
|
RSGenerator lib/rsyntaxtree.rb /^ class RSGenerator$/;" c class:RSyntaxTree
|
33
32
|
RSGenerator lib/rsyntaxtree.rb /^ class RSGenerator$/;" c module:RSyntaxTree
|
34
|
-
RSTError lib/rsyntaxtree.rb /^ class RSTError < StandardError$/;" c class:RSyntaxTree
|
35
33
|
RSTError lib/rsyntaxtree.rb /^class RSTError < StandardError$/;" c
|
36
|
-
RSTError lib/rsyntaxtree/string_parser.rb /^ class RSTError < StandardError$/;" c class:RSyntaxTree
|
37
|
-
RSTError lib/rsyntaxtree/string_parser.rb /^class RSTError < StandardError$/;" c
|
38
|
-
RSTError lib/rsyntaxtree/utils.rb /^class RSTError < StandardError$/;" c
|
39
34
|
RSyntaxTree lib/rsyntaxtree.rb /^module RSyntaxTree$/;" m
|
40
35
|
RSyntaxTree lib/rsyntaxtree/base_graph.rb /^module RSyntaxTree$/;" m
|
41
36
|
RSyntaxTree lib/rsyntaxtree/element.rb /^module RSyntaxTree$/;" m
|
@@ -43,7 +38,7 @@ RSyntaxTree lib/rsyntaxtree/elementlist.rb /^module RSyntaxTree$/;" m
|
|
43
38
|
RSyntaxTree lib/rsyntaxtree/string_parser.rb /^module RSyntaxTree$/;" m
|
44
39
|
RSyntaxTree lib/rsyntaxtree/svg_graph.rb /^module RSyntaxTree$/;" m
|
45
40
|
RSyntaxTree lib/rsyntaxtree/version.rb /^module RSyntaxTree$/;" m
|
46
|
-
SUBSCRIPT_CONST lib/rsyntaxtree.rb /^
|
41
|
+
SUBSCRIPT_CONST lib/rsyntaxtree.rb /^SUBSCRIPT_CONST = 0.7$/;" C
|
47
42
|
SVGGraph lib/rsyntaxtree/svg_graph.rb /^ class SVGGraph < BaseGraph$/;" c class:RSyntaxTree
|
48
43
|
SVGGraph lib/rsyntaxtree/svg_graph.rb /^ class SVGGraph < BaseGraph$/;" c module:RSyntaxTree
|
49
44
|
String lib/rsyntaxtree/utils.rb /^class String$/;" c
|
@@ -51,10 +46,10 @@ StringParser lib/rsyntaxtree/string_parser.rb /^ class StringParser$/;" c class
|
|
51
46
|
StringParser lib/rsyntaxtree/string_parser.rb /^ class StringParser$/;" c module:RSyntaxTree
|
52
47
|
Tips README.md /^### Tips$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
53
48
|
Usage README.md /^### Usage$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
54
|
-
VERSION lib/rsyntaxtree/version.rb /^ VERSION = "1.0.
|
49
|
+
VERSION lib/rsyntaxtree/version.rb /^ VERSION = "1.0.2"$/;" C module:RSyntaxTree
|
50
|
+
WHITESPACE_BLOCK lib/rsyntaxtree.rb /^WHITESPACE_BLOCK = "■"$/;" C
|
55
51
|
Web Interface README.md /^### Web Interface$/;" S chapter:🌲 RSyntaxTree: yet another syntax tree generator in Ruby
|
56
52
|
add lib/rsyntaxtree/elementlist.rb /^ def add(element)$/;" f class:RSyntaxTree.ElementList
|
57
|
-
add_child lib/rsyntaxtree/element.rb /^ def add_child(child_id)$/;" f class:RSyntaxTree
|
58
53
|
add_child lib/rsyntaxtree/element.rb /^ def add_child(child_id)$/;" f class:RSyntaxTree.Element
|
59
54
|
all_emoji? lib/rsyntaxtree/utils.rb /^ def all_emoji?$/;" f class:String
|
60
55
|
calculate_height lib/rsyntaxtree/base_graph.rb /^ def calculate_height(id = 1)$/;" f class:RSyntaxTree.BaseGraph
|
@@ -71,10 +66,7 @@ draw_a_path lib/rsyntaxtree/svg_graph.rb /^ def draw_a_path(s_x, s_y, t_x, t_
|
|
71
66
|
draw_connector lib/rsyntaxtree/base_graph.rb /^ def draw_connector(id = 1)$/;" f class:RSyntaxTree.BaseGraph
|
72
67
|
draw_element lib/rsyntaxtree/svg_graph.rb /^ def draw_element(element)$/;" f class:RSyntaxTree.SVGGraph
|
73
68
|
draw_elements lib/rsyntaxtree/base_graph.rb /^ def draw_elements$/;" f class:RSyntaxTree.BaseGraph
|
74
|
-
draw_paths lib/rsyntaxtree/svg_graph.rb /^ def draw_paths$/;" f class:RSyntaxTree
|
75
69
|
draw_paths lib/rsyntaxtree/svg_graph.rb /^ def draw_paths$/;" f class:RSyntaxTree.SVGGraph
|
76
|
-
draw_paths lib/rsyntaxtree/svg_graph.rb /^ def draw_paths$/;" f class:RSyntaxTree.SVGGraph.draw_element
|
77
|
-
draw_paths lib/rsyntaxtree/svg_graph.rb /^ def draw_paths$/;" f class:RSyntaxTree.SVGGraph.set_tspan
|
78
70
|
draw_png lib/rsyntaxtree.rb /^ def draw_png(binary = false)$/;" f class:RSyntaxTree.RSGenerator
|
79
71
|
draw_svg lib/rsyntaxtree.rb /^ def draw_svg$/;" f class:RSyntaxTree.RSGenerator
|
80
72
|
draw_tree lib/rsyntaxtree.rb /^ def draw_tree$/;" f class:RSyntaxTree.RSGenerator
|
@@ -82,17 +74,11 @@ elements lib/rsyntaxtree/elementlist.rb /^ attr_accessor :elements, :iterator
|
|
82
74
|
elements= lib/rsyntaxtree/elementlist.rb /^ attr_accessor :elements, :iterator $/;" A class:RSyntaxTree.ElementList
|
83
75
|
elist lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
84
76
|
elist= lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
85
|
-
generate_line lib/rsyntaxtree/svg_graph.rb /^ def generate_line(x1, y1, x2, y2, col, dashed = false, arrow = false)$/;" f class:RSyntaxTree
|
86
|
-
generate_line lib/rsyntaxtree/svg_graph.rb /^ def generate_line(x1, y1, x2, y2, col, dashed = false, arrow = false)$/;" f class:RSyntaxTree.SVGGraph
|
87
|
-
generate_line lib/rsyntaxtree/svg_graph.rb /^ def generate_line(x1, y1, x2, y2, col, dashed = false, arrow = false)$/;" f class:RSyntaxTree.SVGGraph.draw_element
|
88
|
-
generate_line lib/rsyntaxtree/svg_graph.rb /^ def generate_line(x1, y1, x2, y2, col, dashed = false, arrow = false)$/;" f class:RSyntaxTree.SVGGraph.set_tspan
|
89
77
|
generate_line lib/rsyntaxtree/svg_graph.rb /^ def generate_line(x1, y1, x2, y2, col, dashed = false, arrow = false, stroke_width = 1)$/;" f class:RSyntaxTree.SVGGraph
|
90
|
-
generate_line lib/rsyntaxtree/svg_graph.rb /^ def generate_line(x1, y1, x2, y2, col, dashed = false, arrow = false, stroke_width = 2)$/;" f class:RSyntaxTree.SVGGraph
|
91
78
|
get_child_count lib/rsyntaxtree/elementlist.rb /^ def get_child_count(id)$/;" f class:RSyntaxTree.ElementList
|
92
79
|
get_children lib/rsyntaxtree/elementlist.rb /^ def get_children(id)$/;" f class:RSyntaxTree.ElementList
|
93
80
|
get_element_width lib/rsyntaxtree/elementlist.rb /^ def get_element_width(id)$/;" f class:RSyntaxTree.ElementList
|
94
81
|
get_elementlist lib/rsyntaxtree/string_parser.rb /^ def get_elementlist$/;" f class:RSyntaxTree.StringParser
|
95
|
-
get_elementlist lib/rsyntaxtree/string_parser.rb /^ def get_elementlist$/;" f class:RSyntaxTree.StringParser.initialize
|
96
82
|
get_elements lib/rsyntaxtree/elementlist.rb /^ def get_elements$/;" f class:RSyntaxTree.ElementList
|
97
83
|
get_first lib/rsyntaxtree/elementlist.rb /^ def get_first$/;" f class:RSyntaxTree.ElementList
|
98
84
|
get_id lib/rsyntaxtree/elementlist.rb /^ def get_id(id)$/;" f class:RSyntaxTree.ElementList
|
@@ -103,7 +89,6 @@ get_metrics lib/rsyntaxtree/utils.rb /^ def get_metrics(text, font, fontsize, f
|
|
103
89
|
get_metrics lib/rsyntaxtree/utils.rb /^ def get_metrics(text, font, fontsize, font_style, font_weight)$/;" f module:FontMetrics
|
104
90
|
get_next lib/rsyntaxtree/elementlist.rb /^ def get_next$/;" f class:RSyntaxTree.ElementList
|
105
91
|
get_next_token lib/rsyntaxtree/string_parser.rb /^ def get_next_token$/;" f class:RSyntaxTree.StringParser
|
106
|
-
get_next_token lib/rsyntaxtree/string_parser.rb /^ def get_next_token$/;" f class:RSyntaxTree.StringParser.initialize
|
107
92
|
get_rightmost lib/rsyntaxtree/base_graph.rb /^ def get_rightmost(id = 1)$/;" f class:RSyntaxTree.BaseGraph
|
108
93
|
height lib/rsyntaxtree/svg_graph.rb /^ attr_accessor :width, :height$/;" A class:RSyntaxTree.SVGGraph
|
109
94
|
height= lib/rsyntaxtree/svg_graph.rb /^ attr_accessor :width, :height$/;" A class:RSyntaxTree.SVGGraph
|
@@ -111,34 +96,24 @@ id lib/rsyntaxtree/element.rb /^ attr_accessor :id,$/;" A class:RSyntaxTree.E
|
|
111
96
|
id lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
112
97
|
id= lib/rsyntaxtree/element.rb /^ attr_accessor :id,$/;" A class:RSyntaxTree.Element
|
113
98
|
id= lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
114
|
-
initialize lib/rsyntaxtree.rb /^ def initialize(msg="Error: something unexpected occurred")$/;" f class:RSyntaxTree.RSTError
|
115
99
|
initialize lib/rsyntaxtree.rb /^ def initialize(params = {})$/;" f class:RSyntaxTree.RSGenerator
|
116
100
|
initialize lib/rsyntaxtree.rb /^ def initialize(msg="Error: something unexpected occurred")$/;" f class:RSTError
|
117
101
|
initialize lib/rsyntaxtree/base_graph.rb /^ def initialize(element_list, params)$/;" f class:RSyntaxTree.BaseGraph
|
118
102
|
initialize lib/rsyntaxtree/element.rb /^ def initialize(id, parent, content, level, fontset, fontsize)$/;" f class:RSyntaxTree.Element
|
119
103
|
initialize lib/rsyntaxtree/elementlist.rb /^ def initialize$/;" f class:RSyntaxTree.ElementList
|
120
|
-
initialize lib/rsyntaxtree/string_parser.rb /^ def initialize(msg="Error: something unexpected occurred")$/;" f class:RSyntaxTree.RSTError
|
121
104
|
initialize lib/rsyntaxtree/string_parser.rb /^ def initialize(str, fontset, fontsize)$/;" f class:RSyntaxTree.StringParser
|
122
|
-
initialize lib/rsyntaxtree/string_parser.rb /^ def initialize(msg="Error: something unexpected occurred")$/;" f class:RSTError
|
123
|
-
initialize lib/rsyntaxtree/string_parser.rb /^ def initialize(msg="Error: something unexpected occurred")$/;" f class:RSyntaxTree.RSTError
|
124
105
|
initialize lib/rsyntaxtree/svg_graph.rb /^ def initialize(element_list, params)$/;" f class:RSyntaxTree.SVGGraph
|
125
|
-
initialize lib/rsyntaxtree/utils.rb /^ def initialize(msg="Error: something unexpected occurred")$/;" f class:RSTError
|
126
106
|
iterator lib/rsyntaxtree/elementlist.rb /^ attr_accessor :elements, :iterator $/;" A class:RSyntaxTree.ElementList
|
127
107
|
iterator= lib/rsyntaxtree/elementlist.rb /^ attr_accessor :elements, :iterator $/;" A class:RSyntaxTree.ElementList
|
128
108
|
level lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
129
109
|
level= lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
130
|
-
line_to_parent lib/rsyntaxtree/svg_graph.rb /^ def line_to_parent(parent, child)$/;" f class:RSyntaxTree
|
131
110
|
line_to_parent lib/rsyntaxtree/svg_graph.rb /^ def line_to_parent(parent, child)$/;" f class:RSyntaxTree.SVGGraph
|
132
|
-
line_to_parent lib/rsyntaxtree/svg_graph.rb /^ def line_to_parent(parent, child)$/;" f class:RSyntaxTree.SVGGraph.draw_element
|
133
|
-
line_to_parent lib/rsyntaxtree/svg_graph.rb /^ def line_to_parent(parent, child)$/;" f class:RSyntaxTree.SVGGraph.set_tspan
|
134
111
|
make_balance lib/rsyntaxtree/base_graph.rb /^ def make_balance(id = 1)$/;" f class:RSyntaxTree.BaseGraph
|
135
112
|
make_tree lib/rsyntaxtree/string_parser.rb /^ def make_tree(parent)$/;" f class:RSyntaxTree.StringParser
|
136
|
-
make_tree lib/rsyntaxtree/string_parser.rb /^ def make_tree(parent)$/;" f class:RSyntaxTree.StringParser.initialize
|
137
113
|
node_centering lib/rsyntaxtree/base_graph.rb /^ def node_centering$/;" f class:RSyntaxTree.BaseGraph
|
138
114
|
parse lib/rsyntaxtree/markup_parser.rb /^ def parse(txt)$/;" f class:Markup
|
139
115
|
parse lib/rsyntaxtree/markup_parser.rb /^ def parse(txt)$/;" f module:Markup
|
140
116
|
parse lib/rsyntaxtree/string_parser.rb /^ def parse$/;" f class:RSyntaxTree.StringParser
|
141
|
-
parse lib/rsyntaxtree/string_parser.rb /^ def parse$/;" f class:RSyntaxTree.StringParser.initialize
|
142
117
|
parse_list lib/rsyntaxtree/base_graph.rb /^ def parse_list$/;" f class:RSyntaxTree.BaseGraph
|
143
118
|
pos lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
144
119
|
pos= lib/rsyntaxtree/string_parser.rb /^ attr_accessor :data, :elist, :pos, :id, :level$/;" A class:RSyntaxTree.StringParser
|
@@ -146,16 +121,13 @@ rsyntaxtree rsyntaxtree.gemspec /^ s.name = "rsyntaxtree"$/;" g
|
|
146
121
|
set_element_width lib/rsyntaxtree/elementlist.rb /^ def set_element_width(id, width)$/;" f class:RSyntaxTree.ElementList
|
147
122
|
set_hierarchy lib/rsyntaxtree/elementlist.rb /^ def set_hierarchy$/;" f class:RSyntaxTree.ElementList
|
148
123
|
set_indent lib/rsyntaxtree/elementlist.rb /^ def set_indent(id, indent)$/;" f class:RSyntaxTree.ElementList
|
149
|
-
set_tspan lib/rsyntaxtree/svg_graph.rb /^ def set_tspan$/;" f class:RSyntaxTree.SVGGraph
|
150
124
|
set_tspan lib/rsyntaxtree/svg_graph.rb /^ def set_tspan(this_x, this_y, style, decoration, fontstyle, text)$/;" f class:RSyntaxTree.SVGGraph
|
151
|
-
set_tspan lib/rsyntaxtree/svg_graph.rb /^ def set_tspan(x, y, style, decoration, fontstyle, text)$/;" f class:RSyntaxTree.SVGGraph
|
152
125
|
setup lib/rsyntaxtree/element.rb /^ def setup$/;" f class:RSyntaxTree.Element
|
153
126
|
setup test/markup_parser_test.rb /^ def setup$/;" f class:MarkupParserTest
|
154
127
|
split_by_emoji lib/rsyntaxtree/utils.rb /^ def split_by_emoji$/;" f class:String
|
155
128
|
svg_data lib/rsyntaxtree/svg_graph.rb /^ def svg_data$/;" f class:RSyntaxTree.SVGGraph
|
156
129
|
test_evaluator test/markup_parser_test.rb /^ def test_evaluator$/;" f
|
157
130
|
test_evaluator test/markup_parser_test.rb /^ def test_evaluator$/;" f class:MarkupParserTest
|
158
|
-
test_rule_blankline test/markup_parser_test.rb /^ def test_rule_blankline$/;" f class:MarkupParserTest
|
159
131
|
test_rule_bold test/markup_parser_test.rb /^ def test_rule_bold$/;" f
|
160
132
|
test_rule_bold test/markup_parser_test.rb /^ def test_rule_bold$/;" f class:MarkupParserTest
|
161
133
|
test_rule_bolditalic test/markup_parser_test.rb /^ def test_rule_bolditalic$/;" f
|
@@ -191,12 +163,8 @@ test_rule_text test/markup_parser_test.rb /^ def test_rule_text$/;" f class:Mar
|
|
191
163
|
test_rule_triangle test/markup_parser_test.rb /^ def test_rule_triangle$/;" f class:MarkupParserTest
|
192
164
|
test_rule_underline test/markup_parser_test.rb /^ def test_rule_underline$/;" f
|
193
165
|
test_rule_underline test/markup_parser_test.rb /^ def test_rule_underline$/;" f class:MarkupParserTest
|
194
|
-
triangle_to_parent lib/rsyntaxtree/svg_graph.rb /^ def triangle_to_parent(parent, child)$/;" f class:RSyntaxTree
|
195
166
|
triangle_to_parent lib/rsyntaxtree/svg_graph.rb /^ def triangle_to_parent(parent, child)$/;" f class:RSyntaxTree.SVGGraph
|
196
|
-
triangle_to_parent lib/rsyntaxtree/svg_graph.rb /^ def triangle_to_parent(parent, child)$/;" f class:RSyntaxTree.SVGGraph.draw_element
|
197
|
-
triangle_to_parent lib/rsyntaxtree/svg_graph.rb /^ def triangle_to_parent(parent, child)$/;" f class:RSyntaxTree.SVGGraph.set_tspan
|
198
167
|
valid lib/rsyntaxtree/string_parser.rb /^ def self.valid?(data)$/;" F class:RSyntaxTree.StringParser
|
199
|
-
valid lib/rsyntaxtree/string_parser.rb /^ def self.valid?(data)$/;" F class:RSyntaxTree.StringParser.initialize
|
200
168
|
valid? lib/rsyntaxtree/string_parser.rb /^ def self.valid?(data)$/;" S class:RSyntaxTree.StringParser
|
201
169
|
width lib/rsyntaxtree/svg_graph.rb /^ attr_accessor :width, :height$/;" A class:RSyntaxTree.SVGGraph
|
202
170
|
width= lib/rsyntaxtree/svg_graph.rb /^ attr_accessor :width, :height$/;" A class:RSyntaxTree.SVGGraph
|
data/lib/rsyntaxtree/element.rb
CHANGED
@@ -197,11 +197,9 @@ module RSyntaxTree
|
|
197
197
|
|
198
198
|
if spaceat
|
199
199
|
parts[0] = token_r[0, spaceat].join
|
200
|
-
# parts[0] = parts[0].gsub("\\>", "﹥").gsub("\\<", "﹤")
|
201
200
|
|
202
201
|
tl =token_r.length
|
203
202
|
parts[1] = token_r[spaceat, tl - spaceat].join
|
204
|
-
# parts[1] = parts[1].gsub("\\>", "﹥").gsub("\\<", "﹤")
|
205
203
|
|
206
204
|
element = Element.new(@id, parent, parts[0], @level, @fontset, @fontsize)
|
207
205
|
@id += 1
|
@@ -212,7 +210,6 @@ module RSyntaxTree
|
|
212
210
|
@id += 1
|
213
211
|
@elist.add(element)
|
214
212
|
else
|
215
|
-
# joined = token_r.join.gsub("\\>", "﹥").gsub("\\<", "﹤")
|
216
213
|
joined = token_r.join
|
217
214
|
element = Element.new(@id, parent, joined, @level, @fontset, @fontsize)
|
218
215
|
@id += 1
|
@@ -388,7 +388,8 @@ EOD
|
|
388
388
|
path_pool_other = {}
|
389
389
|
path_pool_source = {}
|
390
390
|
path_flags = []
|
391
|
-
elist = @element_list.get_elements.reverse
|
391
|
+
# elist = @element_list.get_elements.reverse
|
392
|
+
elist = @element_list.get_elements
|
392
393
|
|
393
394
|
elist.each do |element|
|
394
395
|
x1 = element.horizontal_indent + element.content_width / 2
|
data/lib/rsyntaxtree/version.rb
CHANGED
data/lib/rsyntaxtree.rb
CHANGED
@@ -149,7 +149,7 @@ module RSyntaxTree
|
|
149
149
|
end
|
150
150
|
|
151
151
|
def draw_svg
|
152
|
-
sp = StringParser.new(@params[:data].gsub('&', '&').gsub('%', '
|
152
|
+
sp = StringParser.new(@params[:data].gsub('&', '&').gsub('%', '%'), @params[:fontset], @params[:fontsize])
|
153
153
|
sp.parse
|
154
154
|
graph = SVGGraph.new(sp.get_elementlist, @params)
|
155
155
|
graph.svg_data
|
data/syntree.png
ADDED
Binary file
|
data/syntree.svg
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg width="161.4" height="471.2" viewBox="-20, -20, 181.4, 491.2" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
4
|
+
<defs>
|
5
|
+
<marker id="arrow" markerUnits="strokeWidth" markerWidth="12.160000000000002" markerHeight="12.160000000000002" viewBox="0 0 12.160000000000002 12.160000000000002" refX="6.080000000000001" refY="0">
|
6
|
+
<polyline fill="none" stroke="purple" stroke-width="1" points="0,12.160000000000002,6.080000000000001,0,12.160000000000002,12.160000000000002" />
|
7
|
+
</marker>
|
8
|
+
<pattern id="hatchBlack" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
|
9
|
+
<line x1="0" y="0" x2="0" y2="10" stroke="black" stroke-width="4"></line>
|
10
|
+
</pattern>
|
11
|
+
<pattern id="hatchForNode" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
|
12
|
+
<line x1="0" y="0" x2="0" y2="10" stroke="blue" stroke-width="4"></line>
|
13
|
+
</pattern>
|
14
|
+
<pattern id="hatchForLeaf" x="10" y="10" width="10" height="10" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
|
15
|
+
<line x1="0" y="0" x2="0" y2="10" stroke="green" stroke-width="4"></line>
|
16
|
+
</pattern>
|
17
|
+
</defs>
|
18
|
+
<rect x="-20" y="-20" width="181.4" height="491.2" stroke="none" fill="white" />"
|
19
|
+
<text white-space='pre' alignment-baseline='text-top' style='fill: blue; font-size: 64px;' x='30.400000000000006' y='132.0'><tspan x='30.400000000000006' y='132.0' style="" text-decoration="" font-family="'Noto Sans', 'Noto Sans JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', sans-serif">X%</tspan>
|
20
|
+
</text>
|
21
|
+
<text white-space='pre' alignment-baseline='text-top' style='fill: green; font-size: 64px;' x='33.400000000000006' y='431.2'><tspan x='33.400000000000006' y='431.2' style="" text-decoration="" font-family="'Noto Sans', 'Noto Sans JP', OpenMoji, 'OpenMoji Color', 'OpenMoji Black', sans-serif">X&</tspan>
|
22
|
+
</text>
|
23
|
+
<line style='stroke:black; stroke-width:2;' x1='75.9' y1='321.2' x2='75.9' y2='187.0' />
|
24
|
+
</svg>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsyntaxtree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoichiro Hasebe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rmagick
|
@@ -118,6 +118,8 @@ files:
|
|
118
118
|
- lib/rsyntaxtree/utils.rb
|
119
119
|
- lib/rsyntaxtree/version.rb
|
120
120
|
- rsyntaxtree.gemspec
|
121
|
+
- syntree.png
|
122
|
+
- syntree.svg
|
121
123
|
- test/markup_parser_test.rb
|
122
124
|
homepage: http://github.com/yohasebe/rsyntaxtree
|
123
125
|
licenses:
|