From 867b3d045cb971618e854c066d54123155884902 Mon Sep 17 00:00:00 2001 From: Florian Deljarry Date: Tue, 2 Jun 2020 10:41:21 -0400 Subject: [PATCH] src/astbuilder: move `do_all` method in ASTBuilder Signed-off-by: Florian Deljarry --- src/astbuilder.nit | 11 +++++++++++ src/contracts.nit | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/astbuilder.nit b/src/astbuilder.nit index f3b35ea..3fe85fd 100644 --- a/src/astbuilder.nit +++ b/src/astbuilder.nit @@ -418,6 +418,17 @@ redef class AMethPropdef self.mpropdef = mmethoddef if mpropdef != null then self.location = mmethoddef.location end + + # Execute all method verification scope flow and typing. + # It also execute an ast validation to define all parents and all locations + fun do_all(toolcontext: ToolContext) + do + self.validate + # FIXME: The `do_` usage it is maybe to much (verification...). Solution: Cut the `do_` methods into simpler parts + self.do_scope(toolcontext) + self.do_flow(toolcontext) + self.do_typing(toolcontext.modelbuilder) + end end redef class AAssertExpr diff --git a/src/contracts.nit b/src/contracts.nit index e2bad53..1825ec1 100644 --- a/src/contracts.nit +++ b/src/contracts.nit @@ -687,17 +687,6 @@ end redef class AMethPropdef - # Execute all method verification scope flow and typing. - # It also execute an ast validation to define all parents and all locations - private fun do_all(toolcontext: ToolContext) - do - self.validate - # FIXME: The `do_` usage it is maybe to much (verification...). Solution: Cut the `do_` methods into simpler parts - self.do_scope(toolcontext) - self.do_flow(toolcontext) - self.do_typing(toolcontext.modelbuilder) - end - # Entry point to create a contract (verification of inheritance, or new contract). redef fun create_contracts(v) do -- 1.7.9.5