ast_array.sa
来自「SRI international 发布的OAA框架软件」· SA 代码 · 共 33 行
SA
33 行
(*
ANTLR Translator Generator
Project led by Terence Parr at http://www.jGuru.com
Software rights: http://www.antlr.org/RIGHTS.html
$Id: ast_array.sa,v 1.1.1.1 2002/01/02 19:59:09 agno Exp $
*)
class ANTLR_AST_ARRAY{AST < $ANTLR_AST{AST}} < $ARR{AST} is
include ARRAY{AST} create->super_create;
private attr num_added : INT;
-- intended to allow call chaining of the type:
-- array.add(x).add(y).add(z)
-- Whatever..
create( capacity : INT ) : SAME is
res : SAME := super_create( capacity );
res.num_added := 0;
return res;
end;
add( ast : AST ) : SAME is
aset( num_added, ast );
num_added := num_added + 1;
return self;
end;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?