rbx-trepanning 0.0.4-universal-rubinius-1.2 → 0.0.6-universal-rubinius-1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/ChangeLog +682 -0
  2. data/NEWS +19 -0
  3. data/README.textile +8 -9
  4. data/Rakefile +8 -8
  5. data/app/complete.rb +52 -0
  6. data/app/complete.rbc +1288 -0
  7. data/app/irb.rb +1 -2
  8. data/app/irb.rbc +55 -72
  9. data/app/llvm.rbc +780 -878
  10. data/app/method.rb +1 -1
  11. data/app/method.rbc +31 -35
  12. data/app/method_name.rbc +2467 -0
  13. data/app/options.rb +7 -24
  14. data/app/options.rbc +238 -132
  15. data/app/rbx-llvm.rbc +2478 -0
  16. data/app/util.rb +3 -3
  17. data/app/util.rbc +23 -27
  18. data/bin/trepanx +4 -3
  19. data/bin/trepanx.compiled.rbc +42 -32
  20. data/data/irbrc +41 -0
  21. data/data/irbrc.compiled.rbc +640 -0
  22. data/interface/base_intf.rb +9 -5
  23. data/interface/base_intf.rbc +200 -146
  24. data/interface/comcodes.rb +10 -8
  25. data/interface/comcodes.rbc +68 -26
  26. data/interface/script.rbc +21 -9
  27. data/interface/user.rb +74 -8
  28. data/interface/user.rbc +1702 -156
  29. data/io/input.rb +37 -14
  30. data/io/input.rbc +869 -320
  31. data/io/tcpclient.rb +7 -1
  32. data/io/tcpclient.rbc +205 -113
  33. data/io/tcpfns.rb +5 -3
  34. data/io/tcpfns.rbc +82 -40
  35. data/io/tcpserver.rb +13 -10
  36. data/io/tcpserver.rbc +236 -183
  37. data/lib/trepanning.rb +62 -21
  38. data/lib/trepanning.rbc +1304 -874
  39. data/lib/{trepanning.rb.orig → trepanning2.rb} +12 -4
  40. data/processor/breakpoint.rb +4 -1
  41. data/processor/command/base/cmd.rb +48 -3
  42. data/processor/command/base/subcmd.rb +2 -1
  43. data/processor/command/base/submgr.rb +23 -20
  44. data/processor/command/base/subsubmgr.rb +13 -2
  45. data/processor/command/complete.rb +7 -17
  46. data/processor/command/continue.rb +19 -11
  47. data/processor/command/disassemble.rb +39 -12
  48. data/processor/command/eval.rb +23 -5
  49. data/processor/command/help.rb +60 -6
  50. data/processor/command/info_subcmd/{file.rb → files.rb} +76 -18
  51. data/processor/command/info_subcmd/line.rb +86 -0
  52. data/processor/command/info_subcmd/program.rb +2 -11
  53. data/processor/command/info_subcmd/ruby.rb +62 -0
  54. data/processor/command/info_subcmd/variables.rb +7 -0
  55. data/processor/command/irb.rb +39 -7
  56. data/processor/command/macro.rb +76 -0
  57. data/processor/command/set_subcmd/confirm.rb +24 -0
  58. data/processor/command/set_subcmd/max.rb +4 -5
  59. data/processor/command/show.rb +11 -0
  60. data/processor/command/show_subcmd/auto.rb +1 -0
  61. data/processor/command/show_subcmd/basename.rb +1 -2
  62. data/processor/command/show_subcmd/confirm.rb +18 -0
  63. data/processor/command/show_subcmd/max.rb +0 -2
  64. data/processor/command/source.rb +0 -1
  65. data/processor/default.rb +2 -0
  66. data/processor/disassemble.rb +1 -0
  67. data/processor/load_cmds.rb +104 -20
  68. data/processor/location.rb +11 -12
  69. data/processor/main.rb +10 -6
  70. data/processor/mock.rb +6 -2
  71. data/processor/stepping.rb +1 -4
  72. data/processor/subcmd.rb +3 -2
  73. data/processor/validate.rb +3 -3
  74. data/sample/list-terminal-colors.rbc +158 -4
  75. data/sample/rocky-trepanx-colors.rb +15 -7
  76. data/sample/rocky-trepanx-colors.rbc +530 -0
  77. data/test/data/quit2.cmd +6 -0
  78. data/test/data/quit2.right +3 -0
  79. data/test/data/step-bug.cmd +11 -0
  80. data/test/data/step-bug.right +3 -0
  81. data/test/example/step-bug.rb +14 -0
  82. data/test/integration/helper.rb +1 -1
  83. data/test/integration/skip-test-step-bug.rb +17 -0
  84. data/test/integration/test-quit.rb +11 -0
  85. data/test/unit/test-app-util.rb +0 -1
  86. data/test/unit/test-base-cmd.rb +47 -0
  87. data/test/unit/test-base-subcmd.rb +2 -2
  88. data/test/unit/test-base-submgr.rb +24 -0
  89. data/test/unit/test-cmd-help.rb +4 -0
  90. data/test/unit/test-completion.rb +38 -0
  91. data/test/unit/test-intf-user.rb +2 -2
  92. data/test/unit/test-io-tcpclient.rb +3 -2
  93. data/test/unit/test-proc-eval.rb +1 -1
  94. data/test/unit/test-proc-load_cmds.rb +9 -0
  95. data/test/unit/test-subcmd-help.rb +1 -5
  96. metadata +182 -167
  97. data/app/options.rb.orig +0 -154
  98. data/bin/trepan.orig +0 -0
  99. data/bin/trepan.rej +0 -11
  100. data/lib/trepanning.rb.rej +0 -11
  101. data/sample/rocky-dot-trepanrc.orig +0 -0
  102. data/sample/rocky-dot-trepanrc.rej +0 -11
@@ -1,7 +1,11 @@
1
- # Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net> Part of
2
- # Trepan::CmdProcess that loads up debugger commands from builtin and
3
- # user directories.
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
3
+
4
+ # Part of Trepan::CmdProcess that loads up debugger commands from
5
+ # builtin and user directories.
4
6
  # Sets @commands, @aliases, @macros
7
+ require 'rubygems'; require 'require_relative'
8
+ require_relative '../app/complete'
5
9
  class Trepan
6
10
  class CmdProcessor
7
11
 
@@ -21,31 +25,37 @@ class Trepan
21
25
  cmd_dirs = [ File.join(File.dirname(__FILE__), 'command') ]
22
26
  cmd_dirs << @settings[:user_cmd_dir] if @settings[:user_cmd_dir]
23
27
  cmd_dirs.each do |cmd_dir|
24
- load_debugger_commands(cmd_dir) if File.directory?(cmd_dir)
25
- end
28
+ load_debugger_commands(cmd_dir) if File.directory?(cmd_dir)
29
+ end
26
30
  end
27
31
 
28
32
  # Loads in debugger commands by require'ing each ruby file in the
29
33
  # 'command' directory. Then a new instance of each class of the
30
34
  # form Trepan::xxCommand is added to @commands and that array
31
35
  # is returned.
32
-
33
- def load_debugger_commands(cmd_dir)
34
- Dir.glob(File.join(cmd_dir, '*.rb')).each do |rb|
35
- require rb
36
- end if File.directory?(cmd_dir)
36
+ def load_debugger_commands(file_or_dir)
37
+ if File.directory?(file_or_dir)
38
+ dir = File.expand_path(file_or_dir)
39
+ Dir.glob(File.join(dir, '*.rb')).each do |rb|
40
+ # We use require so that multiple calls have no effect.
41
+ require rb
42
+ end
43
+ elsif File.readable?(file_or_dir)
44
+ # We use load in case we are reloading.
45
+ # 'require' would not be effective here
46
+ load file_or_dir
47
+ else
48
+ return false
49
+ end
37
50
  # Instantiate each Command class found by the above require(s).
38
- Trepan::Command.constants.grep(/.Command$/).each do |command|
39
- # Note: there is probably a non-eval way to instantiate the
40
- # command, but I don't know it. And eval works.
41
- new_cmd = "Trepan::Command::#{command}.new(self)"
42
- cmd = self.instance_eval(new_cmd)
51
+ Trepan::Command.constants.grep(/.Command$/).each do |name|
52
+ klass = Trepan::Command.const_get(name)
53
+ cmd = klass.send(:new, self)
43
54
 
44
55
  # Add to list of commands and aliases.
45
- cc = cmd.class
46
- cmd_name = cc.const_get(:NAME)
47
- if cc.constants.member?('ALIASES')
48
- aliases= cc.const_get('ALIASES')
56
+ cmd_name = klass.const_get(:NAME)
57
+ if klass.constants.member?('ALIASES')
58
+ aliases= klass.const_get('ALIASES')
49
59
  aliases.each {|a| @aliases[a] = cmd_name}
50
60
  end
51
61
  @commands[cmd_name] = cmd
@@ -74,10 +84,81 @@ class Trepan
74
84
  @commands[cmd_name].run(cmd_array)
75
85
  end
76
86
  end
87
+
88
+ def complete_token_with_next(arg)
89
+ end
90
+
91
+ def complete(arg)
92
+ if arg.kind_of?(String)
93
+ args = arg.split
94
+ elsif arg.kind_of?(Array)
95
+ args = arg
96
+ else
97
+ return []
98
+ end
99
+ args = [''] if args.empty?
100
+ coms_macs = @commands.merge(@macros)
101
+ match_pairs = Trepan::Complete.complete_token_with_next(coms_macs,
102
+ args[0])
103
+ return [] if match_pairs.empty?
104
+ match_hash = {}
105
+ match_pairs.each do |pair|
106
+ match_hash[pair[0]] = pair[1]
107
+ end
108
+ alias_pairs = Trepan::Complete.
109
+ complete_token_filtered_with_next(@aliases, args[0], match_hash,
110
+ @commands)
111
+ match_pairs += alias_pairs
112
+ if args.size == 1
113
+ return match_pairs.map{|pair| pair[0]}.sort
114
+ else
115
+ alias_pairs.each do |pair|
116
+ match_hash[pair[0]] = pair[1]
117
+ end
118
+ if match_pairs.size > 1
119
+ # FIXME: figure out what to do here.
120
+ return match_pairs.map do |name, cmd|
121
+ ["#{name} #{args[1..-1].join(' ')}"]
122
+ end
123
+ end
124
+ # match_pairs.size == 1
125
+ # FIXME generalize more and turn into a routine.
126
+ first_arg, cmd = match_pairs[0]
127
+ if cmd.respond_to?(:complete_token_with_next)
128
+ match_pairs = cmd.complete_token_with_next(args[1])
129
+ if match_pairs.empty?
130
+ return [args.join(' ')]
131
+ elsif args.size > 2 && match_pairs.size == 1
132
+ second_arg, cmd = match_pairs[0]
133
+ if cmd.respond_to?(:complete)
134
+ matches = cmd.complete(args[2])
135
+ return matches.map do |third_arg|
136
+ # FIXME: break out args[3..-1] if that exists to
137
+ # handle more complex completions including subsubcmds.
138
+ "#{first_arg} #{second_arg.to_s} #{third_arg}" +
139
+ ((args.size > 3) ? "#{args[3..-1].join(' ')}" : '')
140
+ end
141
+ end
142
+ end
143
+ return match_pairs.map do |second_arg, junk|
144
+ # FIXME: break out args[2..-1] if that exists to
145
+ # handle more complex completions including subsubcmds.
146
+ "#{first_arg} #{second_arg.to_s}" +
147
+ ((args.size > 2) ? " #{args[2..-1].join(' ')}" : '')
148
+ end
149
+ end
150
+ return ["#{first_arg} #{args[1..-1].join(' ')}"]
151
+ end
152
+ end
77
153
  end
78
154
  end
79
155
  if __FILE__ == $0
80
- cmdproc = Trepan::CmdProcessor.new
156
+ class Trepan::CmdProcessor
157
+ def initialize(core, settings={})
158
+ end
159
+ end
160
+
161
+ cmdproc = Trepan::CmdProcessor.new(nil)
81
162
  cmddir = File.join(File.dirname(__FILE__), 'command')
82
163
  cmdproc.instance_variable_set('@settings', {})
83
164
  cmdproc.load_cmds_initialize
@@ -98,4 +179,7 @@ if __FILE__ == $0
98
179
  cmdproc.run_cmd('foo') # Invalid - not an Array
99
180
  cmdproc.run_cmd([]) # Invalid - empty Array
100
181
  cmdproc.run_cmd(['list', 5]) # Invalid - nonstring arg
182
+ p cmdproc.complete("d")
183
+ p cmdproc.complete("sho d")
184
+ p cmdproc.complete('')
101
185
  end
@@ -1,6 +1,6 @@
1
1
  # Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
2
- require 'rubygems'
3
2
  require 'linecache'
3
+ require 'rubygems'; require 'require_relative'
4
4
  require_relative 'disassemble'
5
5
  require_relative 'msg'
6
6
  require_relative 'frame'
@@ -31,13 +31,13 @@ class Trepan
31
31
 
32
32
  # Get line +line_number+ from file named +filename+. Return "\n"
33
33
  # there was a problem. Leading blanks are stripped off.
34
- def line_at(filename, line_number)
34
+ def line_at(filename, line_number,
35
+ opts = {
36
+ :reload_on_change => @reload_on_change,
37
+ :output => @settings[:highlight]
38
+ })
35
39
  # We use linecache first to give precidence to user-remapped
36
40
  # file names
37
- opts = {
38
- :reload_on_change => @reload_on_change,
39
- :output => @settings[:highlight]
40
- }
41
41
  line = LineCache::getline(filename, line_number, opts)
42
42
  unless line
43
43
  # Try using search directories (set with command "directory")
@@ -53,11 +53,10 @@ class Trepan
53
53
  return line.lstrip.chomp
54
54
  end
55
55
 
56
- def loc_and_text(loc)
57
- opts = {
58
- :reload_on_change => @reload_on_change,
59
- :output => @settings[:highlight]
60
- }
56
+ def loc_and_text(loc, opts=
57
+ {:reload_on_change => @reload_on_change,
58
+ :output => @settings[:highlight]
59
+ })
61
60
  vm_location = @frame.vm_location
62
61
  filename = vm_location.method.active_path
63
62
  line_no = vm_location.line
@@ -68,7 +67,7 @@ class Trepan
68
67
  text = LineCache::getline(static.script, line_no, opts)
69
68
  loc += " remapped #{canonic_file(file)}:#{line_no}"
70
69
  else
71
- text = line_at(filename, line_no)
70
+ text = line_at(filename, line_no, opts)
72
71
  map_file, map_line = LineCache::map_file_line(filename, line_no)
73
72
  if [filename, line_no] != [map_file, map_line]
74
73
  loc += " remapped #{canonic_file(map_file)}:#{map_line}"
data/processor/main.rb CHANGED
@@ -37,6 +37,8 @@ class Trepan
37
37
  # next stop while settings is the default
38
38
  # value to use.
39
39
  attr_accessor :event # Stop event
40
+ attr_reader :intf # Current interface
41
+ # Trepan::Core instance)
40
42
  attr_accessor :leave_cmd_loop # Commands set this to signal to leave
41
43
  # the command loop (which often continues to
42
44
  # run the debugged program).
@@ -178,9 +180,9 @@ class Trepan
178
180
  # Run one debugger command. True is returned if we want to quit.
179
181
  def process_command_and_quit?()
180
182
  intf_size = @dbgr.intf.size
181
- intf = @dbgr.intf[-1]
182
- return true if intf.input_eof? && intf_size == 1
183
- while intf_size > 1 || !intf.input_eof?
183
+ @intf = @dbgr.intf[-1]
184
+ return true if @intf.input_eof? && intf_size == 1
185
+ while intf_size > 1 || !@intf.input_eof?
184
186
  begin
185
187
  @current_command =
186
188
  if @cmd_queue.empty?
@@ -201,7 +203,7 @@ class Trepan
201
203
  if intf_size > 1
202
204
  @dbgr.intf.pop
203
205
  intf_size = @dbgr.intf.size
204
- intf = @dbgr.intf[-1]
206
+ @intf = @dbgr.intf[-1]
205
207
  @last_command = nil
206
208
  print_location
207
209
  else
@@ -215,7 +217,7 @@ class Trepan
215
217
  leave_cmdloop = run_command(@current_command)
216
218
 
217
219
  # Save it to the history.
218
- @dbgr.history_io.puts @last_command
220
+ @intf.history_io.puts @last_command if @last_command && @intf.history_io
219
221
  end
220
222
 
221
223
  def after_cmdloop
@@ -313,7 +315,9 @@ class Trepan
313
315
  msg current_command if settings[:debugmacro]
314
316
  if current_command.is_a?(Array) &&
315
317
  current_command.any {|val| !val.is_a?(String)}
316
- args = current_command
318
+ args = (first=current_command.shift).split
319
+ @cmd_queue += current_command
320
+ current_command = first
317
321
  elsif current_command.is_a?(String)
318
322
  args = current_command.split
319
323
  else
data/processor/mock.rb CHANGED
@@ -26,12 +26,13 @@ module MockDebugger
26
26
  # FIXME: move more stuff of here and into Trepan::CmdProcessor
27
27
  # These below should go into Trepan::CmdProcessor.
28
28
  attr_reader :cmd_argstr, :cmd_name, :vm_locations, :current_frame,
29
- :debugee_thread
29
+ :debugee_thread, :completion_proc
30
30
 
31
31
  def initialize(settings={})
32
32
  @before_cmdloop_hooks = []
33
33
  @settings = Trepan::DEFAULT_SETTINGS.merge(settings)
34
- @intf = [Trepan::UserInterface.new]
34
+ @intf = [Trepan::UserInterface.new(nil, nil,
35
+ :history_save=>false)]
35
36
  @vm_locations = Rubinius::VM.backtrace(1, true)
36
37
  @current_frame = Trepan::Frame.new(self, 0, @vm_locations[0])
37
38
  @debugee_thread = Thread.current
@@ -41,6 +42,8 @@ module MockDebugger
41
42
  ## @core = Trepan::Core.new(self)
42
43
  @trace_filter = []
43
44
 
45
+ @completion_proc = Proc.new{|str| str}
46
+
44
47
  # Don't allow user commands in mocks.
45
48
  ## @core.processor.settings[:user_cmd_dir] = nil
46
49
 
@@ -74,6 +77,7 @@ module MockDebugger
74
77
  cmds = cmdproc.commands
75
78
  cmd = cmds[name]
76
79
  cmd.proc.frame_setup
80
+ cmd.proc.event = 'debugger-call'
77
81
  show_special_class_constants(cmd) if show_constants
78
82
 
79
83
  def cmd.confirm(prompt, default)
@@ -8,8 +8,6 @@ class Trepan
8
8
 
9
9
  f = frame
10
10
 
11
- ip = -1
12
-
13
11
  meth = f.method
14
12
  possible_line = f.line + step
15
13
  next_ip = f.next_ip == f.ip ? f.next_ip + 1 : f.next_ip
@@ -18,7 +16,7 @@ class Trepan
18
16
  fin_ip = meth.first_ip_on_line_after(possible_line, f.next_ip)
19
17
  # fin_ip = meth.first_ip_on_line_after(possible_line, next_ip)
20
18
 
21
- if fin_ip <= -1
19
+ unless fin_ip
22
20
  return step_to_parent('line')
23
21
  end
24
22
 
@@ -33,7 +31,6 @@ class Trepan
33
31
  end
34
32
 
35
33
  meth = f.method
36
- ip = -1
37
34
  fin_ip = meth.lines.last
38
35
 
39
36
  set_breakpoints_on_return_between(meth, f.next_ip, fin_ip)
data/processor/subcmd.rb CHANGED
@@ -1,10 +1,11 @@
1
- # Copyright (C) 2010 Rocky Bernstein <rockyb@rubyforge.net>
1
+ # Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
2
2
  # gdb-like subcommand processing.
3
3
 
4
4
  class Trepan
5
5
  class Subcmd
6
6
 
7
- attr_reader :subcmds
7
+ attr_reader :subcmds # Hash of subcommands. Key is the subcommand name.
8
+ # the value is the subcommand object to run.
8
9
  def initialize(cmd)
9
10
  @cmd = cmd
10
11
  @subcmds = {}
@@ -22,7 +22,7 @@ class Trepan
22
22
  ## include Trepan::Condition
23
23
 
24
24
  def confirm(msg, default)
25
- @dbgr.intf[-1].confirm(msg, default)
25
+ @settings[:confirm] ? @dbgr.intf[-1].confirm(msg, default) : true
26
26
  end
27
27
 
28
28
  # Like cmdfns.get_an_int(), but if there's a stack frame use that
@@ -75,10 +75,10 @@ class Trepan
75
75
  end
76
76
 
77
77
  if val < opts[:min_value]
78
- if cmdname
78
+ if opts[:cmdname]
79
79
  errmsg(("Command '%s' expects an integer at least" +
80
80
  ' %d; got: %d.') %
81
- [cmdname, opts[:min_value], opts[:default]])
81
+ [opts[:cmdname], opts[:min_value], opts[:default]])
82
82
  else
83
83
  errmsg(("Expecting a positive integer at least" +
84
84
  ' %d; got: %d') %
@@ -9,7 +9,7 @@ x
9
9
  10
10
10
  __script__
11
11
  i
12
- 1042
12
+ 1059
13
13
  5
14
14
  7
15
15
  0
@@ -1050,6 +1050,23 @@ i
1050
1050
  157
1051
1051
  0
1052
1052
  15
1053
+ 7
1054
+ 158
1055
+ 64
1056
+ 7
1057
+ 159
1058
+ 64
1059
+ 7
1060
+ 160
1061
+ 64
1062
+ 35
1063
+ 3
1064
+ 56
1065
+ 161
1066
+ 50
1067
+ 157
1068
+ 0
1069
+ 15
1053
1070
  2
1054
1071
  11
1055
1072
  I
@@ -1062,7 +1079,7 @@ I
1062
1079
  0
1063
1080
  n
1064
1081
  p
1065
- 158
1082
+ 162
1066
1083
  s
1067
1084
  8
1068
1085
  rubygems
@@ -1649,8 +1666,141 @@ name
1649
1666
  x
1650
1667
  4
1651
1668
  each
1669
+ s
1670
+ 4
1671
+ bold
1672
+ s
1673
+ 6
1674
+ italic
1675
+ s
1676
+ 9
1677
+ underline
1678
+ M
1679
+ 1
1680
+ p
1681
+ 2
1682
+ x
1683
+ 9
1684
+ for_block
1685
+ t
1686
+ n
1687
+ x
1688
+ 9
1689
+ __block__
1690
+ i
1691
+ 47
1692
+ 57
1693
+ 19
1694
+ 0
1695
+ 15
1696
+ 45
1697
+ 0
1698
+ 1
1699
+ 43
1700
+ 2
1701
+ 20
1702
+ 0
1703
+ 49
1704
+ 3
1705
+ 1
1706
+ 19
1707
+ 1
1708
+ 15
1709
+ 5
1710
+ 20
1711
+ 1
1712
+ 47
1713
+ 101
1714
+ 4
1715
+ 20
1716
+ 0
1717
+ 47
1718
+ 101
1719
+ 4
1720
+ 7
1721
+ 5
1722
+ 20
1723
+ 1
1724
+ 49
1725
+ 6
1726
+ 0
1727
+ 47
1728
+ 101
1729
+ 4
1730
+ 7
1731
+ 7
1732
+ 63
1733
+ 5
1734
+ 47
1735
+ 49
1736
+ 8
1737
+ 1
1738
+ 11
1739
+ I
1740
+ 9
1741
+ I
1742
+ 2
1743
+ I
1744
+ 1
1745
+ I
1746
+ 1
1747
+ n
1748
+ p
1749
+ 9
1750
+ x
1751
+ 4
1752
+ Term
1753
+ n
1754
+ x
1755
+ 9
1756
+ ANSIColor
1757
+ x
1758
+ 4
1759
+ send
1760
+ x
1761
+ 4
1762
+ to_s
1763
+ s
1764
+ 3
1765
+ -
1766
+ x
1767
+ 7
1768
+ inspect
1769
+ s
1770
+ 4
1771
+ 
1772
+ x
1773
+ 4
1774
+ puts
1775
+ p
1776
+ 7
1777
+ I
1778
+ 0
1779
+ I
1780
+ 88
1781
+ I
1782
+ 4
1783
+ I
1784
+ 89
1785
+ I
1786
+ 11
1787
+ I
1788
+ 8a
1789
+ I
1790
+ 2f
1791
+ x
1792
+ 70
1793
+ /home/rocky-rvm/.rvm/src/rbx-trepanning/sample/list-terminal-colors.rb
1794
+ p
1795
+ 2
1796
+ x
1797
+ 4
1798
+ name
1799
+ x
1800
+ 6
1801
+ attrib
1652
1802
  p
1653
- 253
1803
+ 255
1654
1804
  I
1655
1805
  0
1656
1806
  I
@@ -2156,7 +2306,11 @@ I
2156
2306
  I
2157
2307
  57
2158
2308
  I
2159
- 412
2309
+ 410
2310
+ I
2311
+ 88
2312
+ I
2313
+ 423
2160
2314
  x
2161
2315
  70
2162
2316
  /home/rocky-rvm/.rvm/src/rbx-trepanning/sample/list-terminal-colors.rb
@@ -16,19 +16,27 @@ require 'rubygems'
16
16
  require 'coderay'
17
17
  require 'coderay/encoders/term'
18
18
  TERM_TOKEN_COLORS = {
19
- :comment => '3;36', # italic yellow brownish
20
- :constant => '1;34', # bold blue
19
+ :comment => '3;37', # sienna #8b4726
20
+ :constant => '1;34', # Bold Midnight Blue #191970
21
+ :class => '1;2', #
22
+ :doctype => '1;2', #
21
23
  :global_variable => '36', # yellow brownish
22
- :integer => '34', # blue
24
+ :integer => '29', # black #00000
23
25
  :label => '4', # black underline
26
+ :method => '34', # blue #0000FF
27
+ :pre_constant => '3;33', # goldenrod4 #8b6914
24
28
  :regexp => {
25
- :content => '33', # light turquoise (from red)
26
- :delimiter => '1;29',
29
+ :content => '36', # dark cyan #008b8b
30
+ :delimiter => '1;29', # bold black
27
31
  :modifier => '35',
28
32
  :function => '1;29'
29
33
  },
30
- :reserved => '1;32', # bold green (from red)
31
- :symbol => '35', # purple
34
+ :string => {
35
+ :content => '1;37', # ivory4 (grey) #8b8b83
36
+ :delimiter => '1;29', # bold black
37
+ },
38
+ :reserved => '1;32', # bold dark olive green #556b2f RGB: 85, 107, 47
39
+ :symbol => '35', # purple4 #551A8B RGB: 85, 26, 139
32
40
  }
33
41
  module CodeRay::Encoders
34
42
  class Term < Encoder