ast_array.sa

来自「Java写的词法/语法分析器。可生成JAVA语言或者是C++的词法和语法分析器。」· 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: //depot/code/org.antlr/release/antlr-2.7.0/lib/sather/Antlr/ast_array.sa#1 $*)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 + -
显示快捷键?