awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
sweet-js avatar

sweet-js/sweet-coreArchived

0
View on GitHub↗
4,559 stars·210 forks·JavaScript·BSD-2-Clause·23 viewswww.sweetjs.org↗

Sweet Core

Sweet-core is a JavaScript source-to-source compiler and Lisp-style macro system. It functions as a syntax transformer that extends JavaScript by allowing the definition of custom syntax and operators during the compilation process.

The system provides a framework for building domain-specific languages through hygienic, recursive macro expansion and the creation of new language constructs. It distinguishes itself by supporting custom operator definitions with configurable associativity and precedence to control expression evaluation.

The compiler includes a specialized module system for managing compile-time dependencies and runtime helper integration. Its internal architecture covers abstract syntax tree transformation, grammar production matching, and syntax object generation to ensure lexical hygiene.

A command line interface is provided to transform source files into standard JavaScript output files or directories.

Features

  • Macro Compilers - Functions as a JavaScript macro compiler that extends the language with custom syntax and operators during compilation.
  • Custom Macro Definitions - Provides the ability to create named macros that transform specific code patterns into new syntax.
  • Recursive Macro Definitions - Supports recursive macros by binding transformers to names available within their own definitions.
  • Hygienic Macro Systems - Implements a hygienic macro system that tracks lexical contexts to prevent identifier collisions during expansion.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI
  • Macro Expansion Engines - Features a macro expansion engine that supports recursive calls, allowing syntax transformers to process nested constructs.
  • Domain Specific Languages - Enables the development of domain-specific languages by extending JavaScript with custom grammar and syntax rules.
  • JavaScript Source Transformers - Acts as a JavaScript source transformer that creates new language constructs and operators via macros.
  • Hygienic Syntax Generation - Creates identifiers, literals, keywords, and delimiters while maintaining lexical contexts to ensure code hygiene.
  • Compile-Time Code Generation - Automates the production of JavaScript code by manipulating syntax objects and expanding macros at build time.
  • Abstract Syntax Tree Transformations - Implements abstract syntax tree transformations to convert raw syntax objects into new structures during the compilation process.
  • Macro-Driven Transformations - Supports advanced macro-driven transformations for implementing custom language features and recursive syntax transformers.
  • Compiler Command Line Interfaces - Ships a command line interface for executing the compilation process on source files and directories.
  • File Output Managers - Provides capabilities to write the results of macro expansion to specific files or directories via the CLI.
  • Compile-Time Macro Dependency Management - Implements a system for importing runtime code or other macros into the compile-time environment.
  • Compile-Time Module Bindings - Provides a specialized module system to load macro definitions and runtime helpers into the compiler environment.
  • Compile-Time Runtime Integration - Implements a mechanism for loading runtime code and utility functions into the compile-time environment for use within macro definitions.
  • Operator Binding Definitions - Allows the definition of custom operators with specific precedence and associativity to control expression evaluation.
  • Macro Definition Exports - Provides specialized module directives to share custom syntax definitions and compile-time bindings across multiple files.
  • Recursive Grammar Matching - Groups multiple syntax objects by matching them against specific grammar rules during the expansion process.
  • Syntax Object Unwrapping - Unwraps syntax objects to retrieve underlying primitive representations like strings or numbers for logic processing.
  • Operator Precedence Management - Provides a custom operator precedence table to define the evaluation order and grouping of new language symbols.
  • Call-Site Parsing - Iterates through source code at the macro invocation site to match specific grammar productions like expressions.
  • Compile-Time Syntax Analysis - Analyzes code structure at compile time by identifying keywords and iterating through nested delimiters.
  • Star history

    Star history chart for sweet-js/sweet-coreStar history chart for sweet-js/sweet-core

    How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

    Frequently asked questions

    What does sweet-js/sweet-core do?

    Sweet-core is a JavaScript source-to-source compiler and Lisp-style macro system. It functions as a syntax transformer that extends JavaScript by allowing the definition of custom syntax and operators during the compilation process.

    What are the main features of sweet-js/sweet-core?

    The main features of sweet-js/sweet-core are: Macro Compilers, Custom Macro Definitions, Recursive Macro Definitions, Hygienic Macro Systems, Macro Expansion Engines, Domain Specific Languages, JavaScript Source Transformers, Hygienic Syntax Generation.

    What are some open-source alternatives to sweet-js/sweet-core?

    Open-source alternatives to sweet-js/sweet-core include: c3lang/c3c — c3c is the compiler for the C3 programming language, transforming source code into executable binaries, static… dtolnay/thiserror — thiserror is a Rust error handling library and procedural macro designed to define custom error types. It functions as… haxefoundation/haxe — Haxe is a statically typed, multi-target programming language and open-source compiler toolkit that translates a… apache/groovy — Groovy is a JVM programming language and metaprogramming framework that provides a Java compatible environment for… katex/katex — KaTeX is a typesetting library and web math renderer that transforms TeX and LaTeX mathematical notation into… pegjs/pegjs — PegJS is a parsing expression grammar tool and JavaScript parser generator. It functions as a grammar compiler that…

    Open-source alternatives to Sweet Core

    Similar open-source projects, ranked by how many features they share with Sweet Core.
    • c3lang/c3cc3lang avatar

      c3lang/c3c

      5,147View on GitHub↗

      c3c is the compiler for the C3 programming language, transforming source code into executable binaries, static libraries, or dynamic libraries using an LLVM backend. It implements a system based on result-based error handling, scoped memory pooling, and a semantic macro system. The compiler provides first-class support for hardware-backed SIMD vectors that map directly to processor instructions and enables runtime polymorphism through interface-based dynamic dispatch. The project covers a broad set of low-level capabilities, including manual and pooled memory management, inline assembly inte

      C3c3compilerlanguage
      View on GitHub↗5,147
    • dtolnay/thiserrordtolnay avatar

      dtolnay/thiserror

      5,459View on GitHub↗

      thiserror is a Rust error handling library and procedural macro designed to define custom error types. It functions as a trait implementation automator that generates the necessary code for standard library error traits at compile time. The library focuses on eliminating boilerplate by using derive macros to automatically implement display and source methods. It allows for the creation of custom error structs and enums that can map low-level errors to high-level variants while preserving the original cause and backtrace information. Its capabilities cover custom error formatting through temp

      Rust
      View on GitHub↗5,459
    • apache/groovyapache avatar

      apache/groovy

      5,446View on GitHub↗

      Groovy is a JVM programming language and metaprogramming framework that provides a Java compatible environment for building applications. It functions as a dynamic scripting language and a tool for authoring domain-specific languages, allowing for the execution of custom scripts and the creation of specialized mini-languages with concise syntax. The project is distinguished by its ability to modify program behavior and class definitions through both compile-time and runtime metaprogramming. It utilizes a hybrid typing model that combines dynamic method resolution with optional static type che

      Javaapachecompilerdynamic-typing
      View on GitHub↗5,446
    • haxefoundation/haxeHaxeFoundation avatar

      HaxeFoundation/haxe

      6,880View on GitHub↗

      Haxe is a statically typed, multi-target programming language and open-source compiler toolkit that translates a single codebase into native executables and scripts for JavaScript, C++, C#, Java, Python, Lua, PHP, and Flash targets. It provides a unified type system with automatic type inference, a compile-time macro system for code transformation and generation, conditional compilation directives, and a static analysis engine that enforces null safety and eliminates dead code to produce smaller, safer outputs. The language is supported by the HashLink virtual machine, which executes platform

      Haxecompilercross-platformhaxe
      View on GitHub↗6,880
    See all 30 alternatives to Sweet Core→