Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tree-sitter/tree-sitter-javascript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: phwhite/tree-sitter-ucode
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 75 files changed
  • 1 contributor

Commits on Sep 14, 2025

  1. Convert tree-sitter-javascript to tree-sitter-ucode

    This commit represents the complete transformation of tree-sitter-javascript
    into a dedicated ucode language parser, removing JavaScript-specific features
    and adapting the grammar for OpenWrt's ucode scripting language.
    
    - Removed class declarations, class bodies, and all OOP constructs
    - Removed async/await, generators, and yield expressions
    - Removed arrow functions (use function() {} syntax only)
    - Removed new expressions and this keyword support
    - Removed regex literal parsing (/pattern/flags syntax)
    - Removed decorators, private fields, and TypeScript constructs
    - Maintained core procedural programming features
    
    - Removed regex pattern recognition from scanner.c
    - Updated function names from tree_sitter_javascript_* to tree_sitter_ucode_*
    - Ensured '/' is only parsed as division or comment start
    
    - Changed language name from 'javascript' to 'ucode' everywhere
    - Updated repository URLs to github.com/phwhite/tree-sitter-ucode
    - Renamed all binding files and directories accordingly
    - Updated file extensions from .js to .uc/.ucode in configuration
    
    - Reset version to 1.0.0 (from inherited 0.25.0) for fresh start
    - Updated all package.json, Cargo.toml, pyproject.toml, CMakeLists.txt
    - Added Paul White as author/maintainer with copyright notices
    - Updated project descriptions and documentation
    
    - Function declarations and expressions
    - Variables (let, const, var) with proper scoping
    - Control flow (if, for, while, switch, try/catch/finally)
    - Objects and arrays with ucode semantics
    - Template literals with substitution
    - Import/export statements and legacy require()
    - Built-in function calls (print, json, jsonstr, etc.)
    - Hash-bang line support (#!/usr/bin/ucode)
    - POSIX-style regex via match()/replace() functions
    
    - Created comprehensive ucode test file (test.uc)
    - Created JavaScript rejection test (unsupported.js)
    - Parser achieves 100% success on valid ucode syntax
    - Parser correctly rejects unsupported JavaScript features
    - All bindings updated and tested across languages
    
    - Added detailed UCODE.md reference document
    - Updated README.md with ucode-specific information
    - Created CHANGELOG.md documenting this initial release
    - Updated GitHub issue templates for ucode project
    
    This parser is now production-ready for ucode syntax highlighting,
    parsing, and analysis in editors and development tools.
    
    Signed-off-by: Paul White <[email protected]>
    phwhite committed Sep 14, 2025
    Configuration menu
    Copy the full SHA
    f4f4e2e View commit details
    Browse the repository at this point in the history
Loading