All Projects → Fanatics → toast

Fanatics / toast

Licence: BSD-3-Clause license
Plugin-driven CLI utility for code generation using Go source as IDL

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to toast

Ts Type Info
TypeScript AST and code generator [Deprecated]
Stars: ✭ 90 (+73.08%)
Mutual labels:  ast, code-generation
Javaparser
Java 1-15 Parser and Abstract Syntax Tree for Java, including preview features to Java 13
Stars: ✭ 3,972 (+7538.46%)
Mutual labels:  ast, code-generation
Spoon
Spoon is a metaprogramming library to analyze and transform Java source code (up to Java 15). 🥄 is made with ❤️, 🍻 and ✨. It parses source files to build a well-designed AST with powerful analysis and transformation API.
Stars: ✭ 1,078 (+1973.08%)
Mutual labels:  ast, code-generation
Cgen
C/C++ source generation from an AST
Stars: ✭ 107 (+105.77%)
Mutual labels:  ast, code-generation
Ts Morph
TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Stars: ✭ 2,384 (+4484.62%)
Mutual labels:  ast, code-generation
Unified
☔️ interface for parsing, inspecting, transforming, and serializing content through syntax trees
Stars: ✭ 3,036 (+5738.46%)
Mutual labels:  plugins, ast
parse-function
(!! moved to tunnckoCore/opensource multi-package repository !!) 🔱 Parse a function into an object using espree, acorn or babylon parsers. Extensible through Smart Plugins.
Stars: ✭ 37 (-28.85%)
Mutual labels:  plugins, ast
Python3Generator
A toolkit to generate Python 3 source code from Pharo.
Stars: ✭ 25 (-51.92%)
Mutual labels:  ast, code-generation
plugins
Officially supported Psi plugins
Stars: ✭ 52 (+0%)
Mutual labels:  plugins
livestorm-plugin
This repo hosts the exposed APIs that you can use to create a plugin for your Livestorm organization
Stars: ✭ 25 (-51.92%)
Mutual labels:  plugins
origami-build-tools
Standard Origami component development tools.
Stars: ✭ 49 (-5.77%)
Mutual labels:  tooling
Loom
The next generation Minecraft server software and plugin API.
Stars: ✭ 40 (-23.08%)
Mutual labels:  plugins
code summarization public
source code for 'Improving automatic source code summarization via deep reinforcement learning'
Stars: ✭ 71 (+36.54%)
Mutual labels:  ast
stop-spammers
Stop Spammers — WordPress Plugin
Stars: ✭ 31 (-40.38%)
Mutual labels:  plugins
flutter ast
Flutter and Dart AST Analyzer/Parser
Stars: ✭ 87 (+67.31%)
Mutual labels:  ast
concats
🔨 Desktop app to output a single-column csv file of rows of concatenated fields from an input csv or tsv file.
Stars: ✭ 20 (-61.54%)
Mutual labels:  tooling
islpy
Python wrapper for isl, an integer set library
Stars: ✭ 58 (+11.54%)
Mutual labels:  code-generation
predeclared
Find definitions and declarations in Go source code that shadow predeclared identifiers
Stars: ✭ 26 (-50%)
Mutual labels:  ast
Beef
Business Entity Execution Framework
Stars: ✭ 95 (+82.69%)
Mutual labels:  code-generation
tiles
Programmatic code generation
Stars: ✭ 78 (+50%)
Mutual labels:  code-generation

toast logo GoDoc

toast is a plugin-driven code generation tool that parses regular Go code, rather than an IDL like Protobufs or other common defintion code.

Why?

Fanatics loves Go, we have a lot of Go code, and after using plenty of other code generation tools, it struck us that Go code as an IDL could be a nice alternative.

toast makes it much easier to generate code from your Go code, since it gives you pre-parsed AST-like data about your packages and files. Why the name "toast", you ask? toast is a tool to turn your Go code "to AST" in a helpful way.

Usage

$ toast --input . \
    --plugin amdm_gen_db:out=./internal/db \   
    --plugin "amdm_gen_proto --option1 value1 -o v2:out=./api/proto"

See a basic example plugin written in Go.

Installation

If you have Go installed, run:

$ go get github.com/Fanatics/toast/...

Once the project is at a more stable point, pre-built binaries will be made available for download across common platforms.

Status

toast is still under heavy development. Tests are still being written, APIs will change without notice. However, feel free to give it a spin, open issues and submit PRs.

The simplified AST that is sent to a plugin's stdin may (and probably should) change from version to version. It is incomplete, and once tests are ready, we will have a better idea of what else is left to parse and collect.

Please open issues if/when you encounter incompleteness or errors!

Disclaimer

This is not an official Fanatics product (experimental or otherwise), it is just code that happens to be owned by Fanatics.


Want to work on projects like this? Get in touch.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].