• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Go
  • Created about 5 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Transform Go code into it's AST

Welcome to go2ast 👋

Version License: MIT Twitter: reflog

Transform Go code into it's AST

Usage

echo "a := 1" | go run main.go

Example output

[]ast.Stmt {
        &ast.AssignStmt {
                Lhs: []ast.Expr {
                        &ast.Ident {
                                Name: "a",
                        },
                },
                Tok: :=,
                Rhs: []ast.Expr {
                        &ast.BasicLit {
                                ValuePos: 30,
                                Kind: INT,
                                Value: "1",
                        },
                },
        },
}

WASM Demo

Try this live: https://reflog.github.io/go2ast/

Author

👤 Eli Yukelzon

More Repositories

1

struct2interface

CLI Tool to extract an Interface from a Golang struct using AST
Go
20
star
2

toggle-readonly

SublimeText plugin to toggle readonly flag
JavaScript
13
star
3

vscode-jsonresume

JSONResume extension for VSCode
TypeScript
9
star
4

CustomCallout

Clone of UICalloutView without use of private APIs
Objective-C
8
star
5

mattermost-plugin-silencer

Go
6
star
6

gulp-jsoncombine

A plugin for Gulp to combine several JSON files using a custom function
JavaScript
6
star
7

ecs-oneshot-task

Tiny Go CLI Program to run a one-shot (single execution) script on ECS
Go
5
star
8

mattermost-plugin-creepy

Makefile
5
star
9

moonlander-flasher-chrome

Super hacky Chrome Extension that allows you to flash ZSA Moonlander MK1 directly from ORYX!
JavaScript
4
star
10

mattermost-powermode

Powermode for Mattermost
Go
2
star
11

cerebro-plugin-everything

C
2
star
12

license-server

Rust
2
star
13

rkill

Rust clone of fkill - kill process by name, pid or port number
Rust
2
star
14

mattermost-spotify

Mattermost Spotify Integration
Go
1
star
15

seevl-objc

Objective-C Wrapper for Seevl API
1
star
16

paperless-postprocess-google

Go
1
star
17

timecard

simple webapp for time management
JavaScript
1
star
18

GistPlugin

Plugin for Live Writer to post GitHub Gist snippets
C#
1
star
19

bucket-explorer

VSCode Extension for viewing contents of cloud storage
TypeScript
1
star
20

cheater

GUI Cheatsheets for Linux written in Rust + GTK
Rust
1
star
21

mattermost-google-assistant

Google Assistant for Mattermost
Go
1
star
22

solitest

TypeScript
1
star
23

dateconstraints

Validate a date against constraints
Go
1
star
24

route53_register

Tiny Go CLI Program to register EC2 host in Route53
Go
1
star