28 lines
508 B
Erlang
28 lines
508 B
Erlang
-module(gsc_test_ytree).
|
|
|
|
-include("$gsc_include/gsc.hrl").
|
|
|
|
-export([main/0]).
|
|
|
|
|
|
% @doc ys = syntax stem
|
|
-record(ys,
|
|
{tks :: [tk()],
|
|
sig :: [tk()],
|
|
mta :: any(),
|
|
fst :: list(any())}).
|
|
|
|
% syntax tree
|
|
-type yt(StemT, LeafT) :: LeafT
|
|
| #ys{mta :: StemT,
|
|
fst :: [yt(StemT, LeafT)]}.
|
|
|
|
% syntax forest
|
|
-type yf(StemT, LeafT) :: [yt(StemT, LeafT)].
|
|
|
|
|
|
main() ->
|
|
Src = "type foo = bar",
|
|
io:format("~ts~n", [Src]).
|
|
|