SHUNZO
shunz****@shunz*****
2004年 3月 23日 (火) 20:08:23 JST
はじめまして。SHUNZOと申します。 件名の関数ですが以下のようにしたら速くなりそうな気がしませんか? begin case Token of _FUNCTION: begin Result := FunctionDeclaration; end; LB: begin Result := BlockStatement; end; SC: begin Result := ExpressionStatement; if Assigned(Result) then Exit; Result := EmptyStatement; end; _IF: begin Result := IfStatement; end; _WHILE: begin Result := WhileStatement; end; _FOR: begin Result := ForStatement; end; _CONTINUE: begin Result := ContinueStatement; end; _BREAK: begin Result := BreakStatement; end; _RETURN: begin Result := ReturnStatement; end; _SWITCH: begin Result := SwitchStatement; end; _VAR, _STATIC, _GLOBAL: begin Result := VarStatement; end; _TRY: begin Result := TryStatement; { if Assigned(Result) then Exit; Result := CatchStatement; if Assigned(Result) then Exit; Result := FinallyStatement; if Assigned(Result) then Exit; } end; _THROW: begin Result := ThrowStatement; end; _WITH: begin Result := WithStatement; end; _DO: begin Result := DoStatement; end; ATMARK: begin Result := ConditionalCompile; end; else Result:= nil; end; end; たいした変わらないかな。ご検討よろしくお願いいたします。