livetext 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/livetext.rb +3 -2
- data/lib/standard.rb +3 -2
- data/lib/userapi.rb +4 -3
- data/test/data/example_alpha/source.lt3 +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67d7f430d05e96f3d8a7f941cce5cb20b5f9a1d7
|
4
|
+
data.tar.gz: 4bf62b576d115e8e2f80e03c917d9d360d05a0d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bb6d2b83ac80efa2ebf276861cabab2e594fc3923268738a4ec3bbe5a270c41616dea66d16cfec9e296903f36982304850d40fddd32c1a37b49d5946ca2eaf5
|
7
|
+
data.tar.gz: 35c02e07571eb774e4d50a6fe388266c18b2303500e87410351dabc370043589e73a037270fdf267dbba94ce087b6e8a4876cc73d1f18624bc94b9b5c1c2dba6
|
data/lib/livetext.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Livetext
|
2
|
-
VERSION = "0.8.
|
2
|
+
VERSION = "0.8.9"
|
3
3
|
end
|
4
4
|
|
5
5
|
require 'fileutils'
|
@@ -152,7 +152,8 @@ class Livetext
|
|
152
152
|
end
|
153
153
|
|
154
154
|
def handle_sname(line, sigil=".")
|
155
|
-
name = _get_name(line, sigil
|
155
|
+
name = _get_name(line, sigil)
|
156
|
+
# STDERR.puts name.inspect
|
156
157
|
unless @main.respond_to?(name)
|
157
158
|
@main._error! "Name '#{name}' is unknown"
|
158
159
|
return
|
data/lib/standard.rb
CHANGED
@@ -43,7 +43,7 @@ module Livetext::Standard
|
|
43
43
|
_error! "Illegal name '#{funcname}'" if _disallowed?(funcname)
|
44
44
|
func_def = <<-EOS
|
45
45
|
def #{funcname}
|
46
|
-
#{_body_text}
|
46
|
+
#{_body_text(true)}
|
47
47
|
end
|
48
48
|
EOS
|
49
49
|
Livetext::Functions.class_eval func_def
|
@@ -142,7 +142,7 @@ module Livetext::Standard
|
|
142
142
|
name = @_args[0]
|
143
143
|
str = "def #{name}\n"
|
144
144
|
raise "Illegal name '#{name}'" if _disallowed?(name)
|
145
|
-
str +=
|
145
|
+
str += _body_text(true)
|
146
146
|
str += "end\n"
|
147
147
|
eval str
|
148
148
|
rescue => err
|
@@ -205,6 +205,7 @@ module Livetext::Standard
|
|
205
205
|
end
|
206
206
|
|
207
207
|
def r
|
208
|
+
STDERR.puts "@_data = #{@_data.inspect}"
|
208
209
|
_puts @_data # No processing at all
|
209
210
|
end
|
210
211
|
|
data/lib/userapi.rb
CHANGED
@@ -60,14 +60,15 @@ module Livetext::UserAPI
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def _body(sigil=".")
|
63
|
+
def _body(raw=false, sigil=".")
|
64
64
|
lines = []
|
65
65
|
@save_location = @sources.last
|
66
66
|
loop do
|
67
67
|
@line = nextline
|
68
68
|
break if _end?(@line, sigil)
|
69
69
|
next if _comment?(@line, sigil) # FIXME?
|
70
|
-
|
70
|
+
@line = _formatting(@line) unless raw
|
71
|
+
lines << @line
|
71
72
|
end
|
72
73
|
_optional_blank_line
|
73
74
|
if block_given?
|
@@ -79,7 +80,7 @@ module Livetext::UserAPI
|
|
79
80
|
_error!("Expecting .end, found end of file")
|
80
81
|
end
|
81
82
|
|
82
|
-
def _body_text(sigil=".")
|
83
|
+
def _body_text(raw=false, sigil=".")
|
83
84
|
_body(sigil).join("\n")
|
84
85
|
end
|
85
86
|
|