apex-go

module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2025 License: Apache-2.0

README

Apex Language support for Golang

TODO

package main

import (
	"encoding/json"
	"fmt"
	"os"

	"github.com/apexlang/apex-go/parser"
)

func main() {
	schema, err := os.ReadFile("schema.apex")
	if err != nil {
		panic(err)
	}
	doc, err := parser.Parse(parser.ParseParams{
		Source: string(schema),
		Options: parser.ParseOptions{
			NoLocation: true,
			NoSource:   true,
		},
	})
	if err != nil {
		panic(err)
	}

	jsonBytes, err := json.MarshalIndent(doc, "", "  ")
	if err != nil {
		panic(err)
	}
	fmt.Println(string(jsonBytes))
}

Directories

Path Synopsis
cmd
apex-api command
apex-cli command
wapc command
host module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL