pygments.rb 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. data/README.md +2 -0
  2. data/lexers +0 -0
  3. data/lib/pygments/version.rb +1 -1
  4. data/test/test_pygments.rb +1 -1
  5. data/vendor/custom_lexers/github.py +15 -9
  6. data/vendor/pygments-main/AUTHORS +12 -2
  7. data/vendor/pygments-main/CHANGES +52 -2
  8. data/vendor/pygments-main/REVISION +1 -1
  9. data/vendor/pygments-main/docs/src/lexerdevelopment.txt +52 -0
  10. data/vendor/pygments-main/external/lasso-builtins-generator-9.lasso +67 -44
  11. data/vendor/pygments-main/pygmentize +1 -1
  12. data/vendor/pygments-main/pygments/filters/__init__.py +2 -2
  13. data/vendor/pygments-main/pygments/formatter.py +3 -0
  14. data/vendor/pygments-main/pygments/lexers/__init__.py +11 -0
  15. data/vendor/pygments-main/pygments/lexers/_lassobuiltins.py +2880 -3124
  16. data/vendor/pygments-main/pygments/lexers/_mapping.py +30 -20
  17. data/vendor/pygments-main/pygments/lexers/_robotframeworklexer.py +1 -1
  18. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +206 -20
  19. data/vendor/pygments-main/pygments/lexers/agile.py +378 -5
  20. data/vendor/pygments-main/pygments/lexers/asm.py +2 -2
  21. data/vendor/pygments-main/pygments/lexers/compiled.py +235 -8
  22. data/vendor/pygments-main/pygments/lexers/dotnet.py +88 -47
  23. data/vendor/pygments-main/pygments/lexers/functional.py +195 -62
  24. data/vendor/pygments-main/pygments/lexers/github.py +15 -9
  25. data/vendor/pygments-main/pygments/lexers/jvm.py +14 -11
  26. data/vendor/pygments-main/pygments/lexers/math.py +284 -18
  27. data/vendor/pygments-main/pygments/lexers/other.py +132 -21
  28. data/vendor/pygments-main/pygments/lexers/shell.py +29 -15
  29. data/vendor/pygments-main/pygments/lexers/sql.py +1 -1
  30. data/vendor/pygments-main/pygments/lexers/templates.py +8 -8
  31. data/vendor/pygments-main/pygments/lexers/text.py +59 -9
  32. data/vendor/pygments-main/pygments/lexers/web.py +832 -210
  33. data/vendor/pygments-main/pygments/modeline.py +40 -0
  34. data/vendor/pygments-main/tests/examplefiles/Deflate.fs +578 -0
  35. data/vendor/pygments-main/tests/examplefiles/Get-CommandDefinitionHtml.ps1 +66 -0
  36. data/vendor/pygments-main/tests/examplefiles/IPDispatchC.nc +104 -0
  37. data/vendor/pygments-main/tests/examplefiles/IPDispatchP.nc +671 -0
  38. data/vendor/pygments-main/tests/examplefiles/RoleQ.pm6 +23 -0
  39. data/vendor/pygments-main/tests/examplefiles/example.ceylon +29 -10
  40. data/vendor/pygments-main/tests/examplefiles/example.clay +33 -0
  41. data/vendor/pygments-main/tests/examplefiles/example.hx +142 -0
  42. data/vendor/pygments-main/tests/examplefiles/example.lagda +19 -0
  43. data/vendor/pygments-main/tests/examplefiles/example.rexx +50 -0
  44. data/vendor/pygments-main/tests/examplefiles/example.stan +86 -75
  45. data/vendor/pygments-main/tests/examplefiles/garcia-wachs.kk +40 -30
  46. data/vendor/pygments-main/tests/examplefiles/grammar-test.p6 +22 -0
  47. data/vendor/pygments-main/tests/examplefiles/objc_example.m +7 -0
  48. data/vendor/pygments-main/tests/examplefiles/py3tb_test.py3tb +4 -0
  49. data/vendor/pygments-main/tests/examplefiles/swig_java.swg +1329 -0
  50. data/vendor/pygments-main/tests/examplefiles/swig_std_vector.i +225 -0
  51. data/vendor/pygments-main/tests/examplefiles/test.agda +102 -0
  52. data/vendor/pygments-main/tests/examplefiles/test.bb +95 -0
  53. data/vendor/pygments-main/tests/examplefiles/test.ebnf +31 -0
  54. data/vendor/pygments-main/tests/examplefiles/test.p6 +252 -0
  55. data/vendor/pygments-main/tests/examplefiles/type.lisp +16 -0
  56. data/vendor/pygments-main/tests/test_basic_api.py +3 -3
  57. data/vendor/pygments-main/tests/test_lexers_other.py +68 -0
  58. metadata +21 -2
data/README.md CHANGED
@@ -73,6 +73,8 @@ To use a custom pygments installation, specify the path to
73
73
  Pygments.start("/path/to/pygments")
74
74
  ```
75
75
 
76
+ If you'd like logging, set the environmental variable `MENTOS_LOG` to a file path for your logfile.
77
+
76
78
  ## benchmarks
77
79
 
78
80
 
data/lexers CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  module Pygments
2
- VERSION = '0.5.2'
2
+ VERSION = '0.5.4'
3
3
  end
@@ -32,7 +32,7 @@ class PygmentsHighlightTest < Test::Unit::TestCase
32
32
  def test_highlight_works_with_larger_files
33
33
  code = P.highlight(REDIS_CODE)
34
34
  assert_match 'used_memory_peak_human', code
35
- assert_equal 454107, code.bytesize.to_i
35
+ assert_equal 455203, code.bytesize.to_i
36
36
  end
37
37
 
38
38
  def test_returns_nil_on_timeout
@@ -408,7 +408,7 @@ class SlashLanguageLexer(ExtendedRegexLexer):
408
408
  def right_angle_bracket(lexer, match, ctx):
409
409
  if len(ctx.stack) > 1 and ctx.stack[-2] == "string":
410
410
  ctx.stack.pop()
411
- yield match.start(), Punctuation, "}"
411
+ yield match.start(), String.Interpol, u"}"
412
412
  ctx.pos = match.end()
413
413
  pass
414
414
 
@@ -423,7 +423,7 @@ class SlashLanguageLexer(ExtendedRegexLexer):
423
423
  "string": [
424
424
  (r"\\", String.Escape, move_state("string_e")),
425
425
  (r"\"", String, move_state("slash")),
426
- (r"#\{", Punctuation, "slash"),
426
+ (r"#\{", String.Interpol, "slash"),
427
427
  (r'.|\n', String),
428
428
  ],
429
429
  "string_e": [
@@ -459,8 +459,14 @@ class SlashLanguageLexer(ExtendedRegexLexer):
459
459
  (r'true'+_nkw, Name.Builtin),
460
460
  (r'false'+_nkw, Name.Builtin),
461
461
  (r'self'+_nkw, Name.Builtin),
462
+ (r'(class)(\s+)([A-Z][a-zA-Z0-9_\']*)',
463
+ bygroups(Keyword, Whitespace, Name.Class)),
462
464
  (r'class'+_nkw, Keyword),
463
465
  (r'extends'+_nkw, Keyword),
466
+ (r'(def)(\s+)(self)(\s*)(\.)(\s*)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)',
467
+ bygroups(Keyword, Whitespace, Name.Builtin, Whitespace, Punctuation, Whitespace, Name.Function)),
468
+ (r'(def)(\s+)([a-z_][a-zA-Z0-9_\']*=?|<<|>>|==|<=>|<=|<|>=|>|\+|-(self)?|~(self)?|\*|/|%|^|&&|&|\||\[\]=?)',
469
+ bygroups(Keyword, Whitespace, Name.Function)),
464
470
  (r'def'+_nkw, Keyword),
465
471
  (r'if'+_nkw, Keyword),
466
472
  (r'elsif'+_nkw, Keyword),
@@ -482,14 +488,14 @@ class SlashLanguageLexer(ExtendedRegexLexer):
482
488
  (r'throw'+_nkw, Keyword),
483
489
  (r'use'+_nkw, Keyword),
484
490
  (r'switch'+_nkw, Keyword),
485
- (r'\\'+_nkw, Keyword),
486
- (r'λ'+_nkw, Keyword),
491
+ (r'\\', Keyword),
492
+ (r'λ', Keyword),
487
493
  (r'__FILE__'+_nkw, Name.Builtin.Pseudo),
488
494
  (r'__LINE__'+_nkw, Name.Builtin.Pseudo),
489
- (r'[A-Z][a-zA-Z0-9_]*'+_nkw, Name.Constant),
490
- (r'[a-z_][a-zA-Z0-9_]*'+_nkw, Name.Variable),
491
- (r'@[a-z_][a-zA-Z0-9_]*'+_nkw, Name.Variable.Instance),
492
- (r'@@[a-z_][a-zA-Z0-9_]*'+_nkw, Name.Variable.Class),
495
+ (r'[A-Z][a-zA-Z0-9_\']*'+_nkw, Name.Constant),
496
+ (r'[a-z_][a-zA-Z0-9_\']*'+_nkw, Name),
497
+ (r'@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Instance),
498
+ (r'@@[a-z_][a-zA-Z0-9_\']*'+_nkw, Name.Variable.Class),
493
499
  (r'\(', Punctuation),
494
500
  (r'\)', Punctuation),
495
501
  (r'\[', Punctuation),
@@ -540,7 +546,7 @@ class SlashLanguageLexer(ExtendedRegexLexer):
540
546
  (r'::', Operator),
541
547
  (r':', Operator),
542
548
  (r'(\s|\n)+', Whitespace),
543
- (r'[a-z_][a-zA-Z0-9_]*', Name.Variable),
549
+ (r'[a-z_][a-zA-Z0-9_\']*', Name.Variable),
544
550
  ],
545
551
  }
546
552
 
@@ -6,8 +6,9 @@ Major developers are Tim Hatch <tim@timhatch.com> and Armin Ronacher
6
6
  Other contributors, listed alphabetically, are:
7
7
 
8
8
  * Sam Aaron -- Ioke lexer
9
- * Kumar Appaiah -- Debian control lexer
10
9
  * Ali Afshar -- image formatter
10
+ * Thomas Aglassinger -- Rexx lexer
11
+ * Kumar Appaiah -- Debian control lexer
11
12
  * Andreas Amann -- AppleScript lexer
12
13
  * Timothy Armstrong -- Dart lexer fixes
13
14
  * Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers
@@ -15,6 +16,7 @@ Other contributors, listed alphabetically, are:
15
16
  * Stefan Matthias Aust -- Smalltalk lexer
16
17
  * Ben Bangert -- Mako lexers
17
18
  * Max Battcher -- Darcs patch lexer
19
+ * Tim Baumann -- (Literate) Agda lexer
18
20
  * Paul Baumgart, 280 North, Inc. -- Objective-J lexer
19
21
  * Michael Bayer -- Myghty lexers
20
22
  * John Benediktsson -- Factor lexer
@@ -29,20 +31,25 @@ Other contributors, listed alphabetically, are:
29
31
  * Christian Jann -- ShellSession lexer
30
32
  * Christopher Creutzig -- MuPAD lexer
31
33
  * Pete Curry -- bugfixes
32
- * Owen Durni -- haXe lexer
34
+ * Bryan Davis -- EBNF lexer
35
+ * Owen Durni -- Haxe lexer
33
36
  * Nick Efford -- Python 3 lexer
34
37
  * Sven Efftinge -- Xtend lexer
35
38
  * Artem Egorkine -- terminal256 formatter
36
39
  * James H. Fisher -- PostScript lexer
40
+ * William S. Fulton -- SWIG lexer
37
41
  * Carlos Galdino -- Elixir and Elixir Console lexers
38
42
  * Michael Galloy -- IDL lexer
39
43
  * Naveen Garg -- Autohotkey lexer
40
44
  * Laurent Gautier -- R/S lexer
41
45
  * Alex Gaynor -- PyPy log lexer
46
+ * Richard Gerkin -- Igor Pro lexer
42
47
  * Alain Gilbert -- TypeScript lexer
48
+ * Alex Gilding -- BlitzBasic lexer
43
49
  * Bertrand Goetzmann -- Groovy lexer
44
50
  * Krzysiek Goj -- Scala lexer
45
51
  * Matt Good -- Genshi, Cheetah lexers
52
+ * Michał Górny -- vim modeline support
46
53
  * Patrick Gotthardt -- PHP namespaces support
47
54
  * Olivier Guibe -- Asymptote lexer
48
55
  * Jordi Gutiérrez Hermoso -- Octave lexer
@@ -53,6 +60,7 @@ Other contributors, listed alphabetically, are:
53
60
  * Greg Hendershott -- Racket lexer
54
61
  * David Hess, Fish Software, Inc. -- Objective-J lexer
55
62
  * Varun Hiremath -- Debian control lexer
63
+ * Rob Hoelz -- Perl 6 lexer
56
64
  * Doug Hogan -- Mscgen lexer
57
65
  * Ben Hollis -- Mason lexer
58
66
  * Dustin Howett -- Logos lexer
@@ -64,6 +72,7 @@ Other contributors, listed alphabetically, are:
64
72
  * Igor Kalnitsky -- vhdl lexer
65
73
  * Pekka Klärck -- Robot Framework lexer
66
74
  * Eric Knibbe -- Lasso lexer
75
+ * Stepan Koltsov -- Clay lexer
67
76
  * Adam Koprowski -- Opa lexer
68
77
  * Benjamin Kowarsch -- Modula-2 lexer
69
78
  * Alexander Kriegisch -- Kconfig and AspectJ lexers
@@ -97,6 +106,7 @@ Other contributors, listed alphabetically, are:
97
106
  * Mike Nolta -- Julia lexer
98
107
  * Jonas Obrist -- BBCode lexer
99
108
  * David Oliva -- Rebol lexer
109
+ * Pat Pannuto -- nesC lexer
100
110
  * Jon Parise -- Protocol buffers lexer
101
111
  * Ronny Pfannschmidt -- BBCode lexer
102
112
  * Benjamin Peterson -- Test suite refactoring
@@ -6,6 +6,56 @@ Issue numbers refer to the tracker at
6
6
  pull request numbers to the requests at
7
7
  <http://bitbucket.org/birkenfeld/pygments-main/pull-requests/merged>.
8
8
 
9
+ Version 1.7
10
+ -----------
11
+ (under development)
12
+
13
+ - Lexers added:
14
+
15
+ * Clay (PR#184)
16
+ * Perl 6 (PR#181)
17
+ * Swig (PR#168)
18
+ * nesC (PR#166)
19
+ * BlitzBasic (PR#197)
20
+ * EBNF (PR#193)
21
+ * Igor Pro (PR#172)
22
+ * Rexx (PR#199)
23
+ * Agda and Literate Agda (PR#203)
24
+
25
+ - Pygments will now recognize "vim" modelines when guessing the lexer for
26
+ a file based on content (PR#118).
27
+
28
+ - The NameHighlightFilter now works with any Name.* token type (#790).
29
+
30
+ - Python 3 lexer: add new exceptions from PEP 3151.
31
+
32
+ - Opa lexer: add new keywords (PR#170).
33
+
34
+ - Julia lexer: add keywords and underscore-separated number
35
+ literals (PR#176).
36
+
37
+ - Lasso lexer: fix method highlighting, update builtins. Fix
38
+ guessing so that plain XML isn't always taken as Lasso (PR#163).
39
+
40
+ - Objective C/C++ lexers: allow "@" prefixing any expression (#871).
41
+
42
+ - Ruby lexer: fix lexing of Name::Space tokens (#860).
43
+
44
+ - Stan lexer: update for version 1.3.0 of the language (PR#162).
45
+
46
+ - JavaScript lexer: add the "yield" keyword (PR#196).
47
+
48
+ - HTTP lexer: support for PATCH method (PR#190).
49
+
50
+ - Koka lexer: update to newest language spec (PR#201).
51
+
52
+ - Haxe lexer: rewrite and support for Haxe 3 (PR#174).
53
+
54
+ - Prolog lexer: add different kinds of numeric literals (#864).
55
+
56
+ - F# lexer: rewrite with newest spec for F# 3.0 (#842).
57
+
58
+
9
59
  Version 1.6
10
60
  -----------
11
61
  (released Feb 3, 2013)
@@ -259,7 +309,7 @@ Version 1.3
259
309
  * Ada
260
310
  * Coldfusion
261
311
  * Modula-2
262
- * haXe
312
+ * Haxe
263
313
  * R console
264
314
  * Objective-J
265
315
  * Haml and Sass
@@ -318,7 +368,7 @@ Version 1.2
318
368
  * CMake
319
369
  * Ooc
320
370
  * Coldfusion
321
- * haXe
371
+ * Haxe
322
372
  * R console
323
373
 
324
374
  - Added options for rendering LaTeX in source code comments in the
@@ -1 +1 @@
1
- 157c9feaccb8
1
+ 7304e4759ae6
@@ -83,6 +83,58 @@ If no rule matches at the current position, the current char is emitted as an
83
83
  1.
84
84
 
85
85
 
86
+ Adding and testing a new lexer
87
+ ==============================
88
+
89
+ To make pygments aware of your new lexer, you have to perform the following
90
+ steps:
91
+
92
+ First, change to the current directory containing the pygments source code:
93
+
94
+ .. sourcecode:: console
95
+
96
+ $ cd .../pygments-main
97
+
98
+ Next, make sure the lexer is known from outside of the module. All modules in
99
+ the ``pygments.lexers`` specify ``__all__``. For example, ``other.py`` sets:
100
+
101
+ .. sourcecode:: python
102
+
103
+ __all__ = ['BrainfuckLexer', 'BefungeLexer', ...]
104
+
105
+ Simply add the name of your lexer class to this list.
106
+
107
+ Finally the lexer can be made publically known by rebuilding the lexer
108
+ mapping:
109
+
110
+ .. sourcecode:: console
111
+
112
+ $ make mapfiles
113
+
114
+ To test the new lexer, store an example file with the proper extension in
115
+ ``tests/examplefiles``. For example, to test your ``DiffLexer``, add a
116
+ ``tests/examplefiles/example.diff`` containing a sample diff output.
117
+
118
+ Now you can use pygmentize to render your example to HTML:
119
+
120
+ .. sourcecode:: console
121
+
122
+ $ ./pygmentize -O full -f html -o /tmp/example.html tests/examplefiles/example.diff
123
+
124
+ Note that this explicitely calls the ``pygmentize`` in the current directory
125
+ by preceding it with ``./``. This ensures your modifications are used.
126
+ Otherwise a possibly already installed, unmodified version without your new
127
+ lexer would have been called from the system search path (``$PATH``).
128
+
129
+ To view the result, open ``/tmp/example.html`` in your browser.
130
+
131
+ Once the example renders as expected, you should run the complete test suite:
132
+
133
+ .. sourcecode:: console
134
+
135
+ $ make test
136
+
137
+
86
138
  Regex Flags
87
139
  ===========
88
140
 
@@ -5,13 +5,19 @@
5
5
 
6
6
  This is the shell script that was used to extract Lasso 9's built-in keywords
7
7
  and generate most of the _lassobuiltins.py file. When run, it creates a file
8
- named "lassobuiltins-9.py" containing the types, traits, and methods of the
9
- currently-installed version of Lasso 9.
8
+ named "lassobuiltins-9.py" containing the types, traits, methods, and members
9
+ of the currently-installed version of Lasso 9.
10
10
 
11
- A partial list of keywords in Lasso 8 can be generated with this code:
11
+ A list of tags in Lasso 8 can be generated with this code:
12
12
 
13
13
  <?LassoScript
14
- local('l8tags' = list);
14
+ local('l8tags' = list,
15
+ 'l8libs' = array('Cache','ChartFX','Client','Database','File','HTTP',
16
+ 'iCal','Lasso','Link','List','PDF','Response','Stock','String',
17
+ 'Thread','Valid','WAP','XML'));
18
+ iterate(#l8libs, local('library'));
19
+ local('result' = namespace_load(#library));
20
+ /iterate;
15
21
  iterate(tags_list, local('i'));
16
22
  #l8tags->insert(string_removeleading(#i, -pattern='_global_'));
17
23
  /iterate;
@@ -30,9 +36,12 @@ local(f) = file("lassobuiltins-9.py")
30
36
  #f->writeString('# -*- coding: utf-8 -*-
31
37
  """
32
38
  pygments.lexers._lassobuiltins
33
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40
+
41
+ Built-in Lasso types, traits, methods, and members.
34
42
 
35
- Built-in Lasso types, traits, and methods.
43
+ :copyright: Copyright 2006-'+date->year+' by the Pygments team, see AUTHORS.
44
+ :license: BSD, see LICENSE for details.
36
45
  """
37
46
 
38
47
  ')
@@ -42,16 +51,16 @@ lcapi_loadModules
42
51
  // Load all of the libraries from builtins and lassoserver
43
52
  // This forces all possible available types and methods to be registered
44
53
  local(srcs =
45
- tie(
46
- dir(sys_masterHomePath + 'LassoLibraries/builtins/')->eachFilePath,
47
- dir(sys_masterHomePath + 'LassoLibraries/lassoserver/')->eachFilePath
48
- )
54
+ tie(
55
+ dir(sys_masterHomePath + 'LassoLibraries/builtins/')->eachFilePath,
56
+ dir(sys_masterHomePath + 'LassoLibraries/lassoserver/')->eachFilePath
57
+ )
49
58
  )
50
59
 
51
60
  with topLevelDir in #srcs
52
- where !#topLevelDir->lastComponent->beginsWith('.')
61
+ where not #topLevelDir->lastComponent->beginsWith('.')
53
62
  do protect => {
54
- handle_error => {
63
+ handle_error => {
55
64
  stdoutnl('Unable to load: ' + #topLevelDir + ' ' + error_msg)
56
65
  }
57
66
  library_thread_loader->loadLibrary(#topLevelDir)
@@ -61,60 +70,74 @@ do protect => {
61
70
  local(
62
71
  typesList = list(),
63
72
  traitsList = list(),
64
- methodsList = list()
73
+ unboundMethodsList = list(),
74
+ memberMethodsList = list()
65
75
  )
66
76
 
67
- // unbound methods
68
- with method in sys_listUnboundMethods
69
- where !#method->methodName->asString->endsWith('=')
70
- where #method->methodName->asString->isalpha(1)
71
- where #methodsList !>> #method->methodName->asString
72
- do #methodsList->insert(#method->methodName->asString)
77
+ // types
78
+ with type in sys_listTypes
79
+ where #typesList !>> #type
80
+ do {
81
+ #typesList->insert(#type)
82
+ with method in #type->getType->listMethods
83
+ let name = #method->methodName
84
+ where not #name->asString->endsWith('=') // skip setter methods
85
+ where #name->asString->isAlpha(1) // skip unpublished methods
86
+ where #memberMethodsList !>> #name
87
+ do #memberMethodsList->insert(#name)
88
+ }
73
89
 
74
90
  // traits
75
91
  with trait in sys_listTraits
76
- where !#trait->asString->beginsWith('$')
77
- where #traitsList !>> #trait->asString
92
+ where not #trait->asString->beginsWith('$') // skip combined traits
93
+ where #traitsList !>> #trait
78
94
  do {
79
- #traitsList->insert(#trait->asString)
80
- with tmethod in tie(#trait->getType->provides, #trait->getType->requires)
81
- where !#tmethod->methodName->asString->endsWith('=')
82
- where #tmethod->methodName->asString->isalpha(1)
83
- where #methodsList !>> #tmethod->methodName->asString
84
- do #methodsList->insert(#tmethod->methodName->asString)
95
+ #traitsList->insert(#trait)
96
+ with method in tie(#trait->getType->provides, #trait->getType->requires)
97
+ let name = #method->methodName
98
+ where not #name->asString->endsWith('=') // skip setter methods
99
+ where #name->asString->isAlpha(1) // skip unpublished methods
100
+ where #memberMethodsList !>> #name
101
+ do #memberMethodsList->insert(#name)
85
102
  }
86
103
 
87
- // types
88
- with type in sys_listTypes
89
- where #typesList !>> #type->asString
90
- do {
91
- #typesList->insert(#type->asString)
92
- with tmethod in #type->getType->listMethods
93
- where !#tmethod->methodName->asString->endsWith('=')
94
- where #tmethod->methodName->asString->isalpha(1)
95
- where #methodsList !>> #tmethod->methodName->asString
96
- do #methodsList->insert(#tmethod->methodName->asString)
97
- }
104
+ // unbound methods
105
+ with method in sys_listUnboundMethods
106
+ let name = #method->methodName
107
+ where not #name->asString->endsWith('=') // skip setter methods
108
+ where #name->asString->isAlpha(1) // skip unpublished methods
109
+ where #typesList !>> #name
110
+ where #traitsList !>> #name
111
+ where #unboundMethodsList !>> #name
112
+ do #unboundMethodsList->insert(#name)
98
113
 
99
114
  #f->writeString("BUILTINS = {
100
115
  'Types': [
101
116
  ")
102
117
  with t in #typesList
103
- do #f->writeString(" '"+string_lowercase(#t)+"',\n")
118
+ do !#t->asString->endsWith('$') ? #f->writeString(" '"+string_lowercase(#t->asString)+"',\n")
104
119
 
105
120
  #f->writeString(" ],
106
121
  'Traits': [
107
122
  ")
108
123
  with t in #traitsList
109
- do #f->writeString(" '"+string_lowercase(#t)+"',\n")
124
+ do #f->writeString(" '"+string_lowercase(#t->asString)+"',\n")
110
125
 
111
126
  #f->writeString(" ],
112
- 'Methods': [
127
+ 'Unbound Methods': [
113
128
  ")
114
- with t in #methodsList
115
- do #f->writeString(" '"+string_lowercase(#t)+"',\n")
129
+ with t in #unboundMethodsList
130
+ do #f->writeString(" '"+string_lowercase(#t->asString)+"',\n")
116
131
 
117
- #f->writeString(" ],
132
+ #f->writeString(" ]
133
+ }
134
+ MEMBERS = {
135
+ 'Member Methods': [
136
+ ")
137
+ with t in #memberMethodsList
138
+ do #f->writeString(" '"+string_lowercase(#t->asString)+"',\n")
139
+
140
+ #f->writeString(" ]
118
141
  }
119
142
  ")
120
143