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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c91ce7a249cbd6ed27e1f538022a9e3fbc6d435
4
- data.tar.gz: 99a2002ac810d323423651ebcd9a0a9964ccb12a
3
+ metadata.gz: 67d7f430d05e96f3d8a7f941cce5cb20b5f9a1d7
4
+ data.tar.gz: 4bf62b576d115e8e2f80e03c917d9d360d05a0d6
5
5
  SHA512:
6
- metadata.gz: 6c7f6358e3f32cd1a5e2cf0e7fb915a6eca1add56f4cbbeee43c51f929a134d66fc8ff34aaeb80df22f4b900d8d9fe0501c9593bfcb36acf1983b4dd53ee62c3
7
- data.tar.gz: 9e4074bc5af1c26d961852dd057bf63e10b6d3d0a334095644bac488e02d715d2c8cda4551593da9c394c5997c709b03b084d8422ae8a78286bda6b4328f146b
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.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 += _raw_body!
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
- lines << _formatting(@line)
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
 
@@ -1,5 +1,7 @@
1
+ .backtrace
2
+
1
3
  .def alpha
2
- text = _body_text
4
+ text = _body.to_a.join
3
5
  text.gsub!(/\n/, " ")
4
6
  words = text.split.sort
5
7
  words.each {|w| _puts " #{w}" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton