chapi

module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MPL-2.0

README

Chapi

Build Status codecov Maintainability

Chapi is a common language data structure parser, which will parse different language to same JSON object.

Languages Stages (Welcome to PR your usage languages)

Features/Languages Java Python Go Kotlin TypeScript C C#
syntax parse TBC 🆕
function call graph
arch/package graph
real world validate

Todo:

  • Migrate Coca ast (done)
  • Pluggable
  • Multiple Languages (welcome to PR)

TBC:

Development

Syntax Parse Identify Rules:

  1. package name
  2. import name
  3. class / data struct
    1. struct name
    2. struct parameters
    3. function name
    4. return types
    5. function parameters
  4. function
    1. function name
    2. return types
    3. function parameters
  5. method call
    1. new instance call
    2. parameter call
    3. field call
Setup
  1. setup Antlr: brew install antlr
  2. run compile: ./scripts/compile-antlr.sh
Data Structures
// for multiple project analysis
code_project
code_module

// for package dependency analysis
code_package_manager
code_dependency

// package or file as dependency analysis
code_package
code_file

// class-first or function-first
code_data_struct
code_function

// function or class detail
code_annotation
code_field
code_import
code_member
code_position
code_property

// method call information
code_call

License

Phodal's Idea

@ 2020 A Phodal Huang's Idea. This code is distributed under the MPL license. See LICENSE in this directory.

Directories

Path Synopsis
chapi-ast-go

Jump to

Keyboard shortcuts

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