docs: update for objective method syntax and REPL highlighting#10
Merged
Conversation
- Added .gitignore to exclude virtual environment and site directory. - Updated README.md for clarity and improved instructions for local development. - Revised arrays.md to correct function names and enhance examples. - Expanded built-in-functions.md with detailed descriptions and new functions. - Improved classes.md for consistency in method descriptions. - Added switch statement and assert statement sections to control-flow.md. - Enhanced index.md with clearer project introduction and usage instructions. - Updated installation.md to reflect current installation practices and requirements. - Expanded language-reference.md with comprehensive language features and examples. - Corrected loops.md to remove incorrect syntax and clarify loop behavior. - Improved quick-start.md with a clear introduction and example usage. - Expanded standard-library.md with module descriptions and usage examples. - Updated strings.md to clarify string functions and add slicing examples. - Restructured mkdocs.yml for better navigation and organization of documentation.
Rewrite radon-highlight.js and extra.css to use the same token color
palette as radon-project.github.io and the Radon REPL terminal.
radon-highlight.js:
- Inject !important CSS overrides at runtime to beat Material for MkDocs'
bundled hljs theme rules, which override standard class names (.hljs-keyword,
.hljs-string, .hljs-number, .hljs-comment, .hljs-operator) at higher cascade
order. Non-standard names (.hljs-builtin, .hljs-fncall, .hljs-special,
.hljs-punctuation) do not need !important.
- Rewrite grammar rule order (first-match wins): multi-line comment (#! … !#)
→ single-line comment (#) → string → builtin → keyword → number → special
→ fncall → operator → punctuation.
- Add multi-line comment rule (#! … !#) before single-line so #! is not
consumed by the # rule.
- Expand keyword list from 6 to 30+ keywords sourced from core/tokens.py
KEYWORDS list. Add 'as', 'elif', 'for', 'while', 'return', 'import',
'from', 'in', 'and', 'or', 'not', 'try', 'catch', 'raise', 'break',
'continue', 'const', 'static', 'assert', 'switch', 'case', 'default',
'fallthrough', 'fallout', 'del', 'step', 'to'. Remove invalid 'end'.
Add 'null', 'true', 'false', 'this', '__constructor__' as keyword-like.
- Add builtin class sourced from create_global_symbol_table() in
core/builtin_funcs.py. Includes all 37 built-in functions plus 5 built-in
classes: File, String, Json, Requests, builtins.
- Add fncall rule using lookahead (?=\s*\() so ( stays outside the span
and falls through to punctuation.
- Add punctuation rule for {}()[],.;:
- Expand operator regex to cover multi-char operators (->, ++, --, ==, !=,
<=, >=, +=, -=, *=, /=, %=) before single-char to prevent partial matches.
- Fix number regex to also match floats (\b\d+(?:\.\d+)?\b).
- Remove invalid hljs.IMMEDIATE_RE reference from string rule.
- Replace hljs.highlightAll() with explicit querySelectorAll targeting
.language-text.highlight pre code blocks (MkDocs Pygments TextLexer
fallback when no 'rn' lexer is registered) and re-highlight them as 'rn'
using block.textContent to strip Pygments line-number anchors.
extra.css:
- Replace all token colors with the new palette matching radon-project.github.io.
- Add !important on .hljs-keyword, .hljs-string, .hljs-number, .hljs-comment,
.hljs-operator as a CSS fallback matching the runtime JS injection.
- Add new rules: .hljs-builtin (#34d399), .hljs-punctuation (#94a3b8).
- Remove .hljs-function (replaced by .hljs-fncall + .hljs-special, both #c084fc).
- Set .hljs-identifier to inherit (no coloring for plain identifiers).
Token palette:
keyword #7dd3fc sky-blue bold
builtin #34d399 emerald
string #a3e635 lime-green
number #fb923c orange
operator #f87171 salmon
punctuation #94a3b8 slate-gray
comment #5c6591 slate-purple italic
fncall #c084fc violet
special #c084fc violet
- control-flow.md: fix "In Rain" → "In Radon" - data-types.md: add missing `var` declarations in array examples - loops.md: add missing `var` on loop counter in while_break example - classes.md: add missing `const` on Person instantiation example - arrays.md: add missing `const` on Array stdlib usage example All bare assignments (x = ...) have been updated to use the proper `var`/`const` declaration keyword so examples match idiomatic Radon.
…operators radon-highlight.js: extend the operator regex to include: - `//=` integer division-assignment - `//` integer floor division - `^=` exponentiation-assignment Ordering ensures `//=` is tested before `//`, and `//` before `/=`, so each multi-char token is emitted as a single salmon-colored span rather than two partial matches.
BREAKING CHANGE: Document removal of arr_*/str_* builtin functions - Remove arr_append, arr_pop, arr_extend, arr_chunk, arr_get, arr_len docs - Remove str_len, str_find, str_get docs - Add Array methods reference (27 methods) - Add String methods reference (25+ methods) - Add Number methods reference (28 methods) - Add Boolean methods reference (9 methods) - Add HashMap methods reference (18 methods) - Mark array/string stdlib modules as legacy - Add 'Primitive Methods' section to built-in-functions.md - Update quick-start.md example to use .length()
github-actions Bot
added a commit
that referenced
this pull request
May 9, 2026
docs: update for objective method syntax and REPL highlighting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major documentation update covering the new object-oriented method syntax and REPL improvements.
Changes
New Method Syntax Documentation
.append(),.pop(),.sort(),.map(),.filter(), etc.).upper(),.lower(),.split(),.replace(), etc.)arr_*/str_*functionsREPL Enhancement
Syntax Highlighting
Code Examples