ChuckJonas / extract-interface-ts

A Typescript port of a demo from the Definitive Antlr 4 Reference (chapter 4.3)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extract-interface-ts

A Typescript port of a demo from the Definitive Antlr 4 Reference (chapter 4.3) using antlr4ts.

Setup

npm install

Example

Input:

import java.util.List;
import java.util.Map;
public class Demo {
	void f(int x, String y) { }
	int[ ] g(/*no args*/) { return null; }
	List<Map<String, Integer>>[] h() { return null; }
}

Output:

interface IDemo {
	void f(int x, String y);
	int[ ] g(/*no args*/);
	List<Map<String, Integer>>[] h();
}

About

A Typescript port of a demo from the Definitive Antlr 4 Reference (chapter 4.3)


Languages

Language:ANTLR 83.7%Language:TypeScript 12.8%Language:Java 3.4%