MCPcopy Index your code
hub / github.com/DE-labtory/koa

github.com/DE-labtory/koa @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
634 symbols 2,409 edges 56 files 179 documented · 28% updated 3y agov0.1.1 · 2019-02-22★ 7522 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

koa

Build Status License Language Coverage Status

The project is inspired by the simplicity and the ivy-bitcoin.

The koa project is to create a high-level language that has more expressions than the bitcoin script and is simpler and easy to analyze than soldity(ethereum).

A more detailed explanation is given below. - Doc

Architecture

koa architecture

  • Lexer
  • Parser
  • Compiler
  • VM

Language Specification

Primitive Type

  • Integer

It is expressed in int. Integer size is 64 bytes.

  • String

It is expressed in string.

  • Boolean

It is expressed in true or false.

Operators

  • Arithmetic

We support +, -, *, /, % only for integer.

  • Comparison

We support ==, !=, >, <, >=, <= for comparsion.

  • Logical

We support &&, || for logical operation.

  • Prefix

We support !, - for prefix operator.

Condition

It is expressed in if(){} or if(){}else{}.

Etc

  • return
  • \n : All statements should end in \n.
  • Assign : It is expressed in =.

Example Code

```go contract { func Sig(sig string){ string pubkey = "fvfidBGruUYC+mTw7CusaCOQbBuZBiYduFgH8hRW97KLmHn0xzB1FV++KI7syo8qXGo8Un24WP40IT78XjKO"

if checkSig(pubkey, sig){
  return true
}
return false

} } ```

Contribution

Contribution Guide CONTRIBUTION

License

Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE.

CLA Hub

To get started, sign the Contributor License Agreement.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 330
Method 187
Struct 84
TypeAlias 15
Interface 12
FuncType 6

Languages

Go100%

Modules by API surface

vm/vm.go90 symbols
ast/ast.go59 symbols
parse/parser.go54 symbols
vm/vm_test.go37 symbols
parse/parser_internal_test.go37 symbols
translate/compiler_internal_test.go32 symbols
parse/lex.go30 symbols
translate/compiler.go29 symbols
parse/parser_test.go22 symbols
parse/lex_internal_test.go18 symbols
vm/asm.go16 symbols
translate/tracer.go16 symbols

For agents

$ claude mcp add koa \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page