core/RGMethod.st
changeset 21 3945989c6e00
parent 12 ae376bb422f5
equal deleted inserted replaced
20:4b3bbdb77e1f 21:3945989c6e00
    94 COPYRIGHT (c) 2020 LabWare
    94 COPYRIGHT (c) 2020 LabWare
    95 
    95 
    96 "
    96 "
    97 ! !
    97 ! !
    98 
    98 
       
    99 
    99 !RGMethod methodsFor:'accessing'!
   100 !RGMethod methodsFor:'accessing'!
   100 
   101 
   101 argumentNames		
   102 argumentNames		
   102 
   103 
   103     ^ self ast argumentNames
   104     ^ self ast argumentNames
   104 !
   105 !
   105 
   106 
   106 ast
   107 ast
   107     "Answer my AST with semantic analysis. See #parseTree."
   108     "Answer my AST with semantic analysis. See #parseTree."
   108     
   109     
   109     ^ self propertyNamed: #ast ifAbsentPut: [ self parseTree doSemanticAnalysisIn: self methodClass ]
   110     ^ self propertyNamed: #ast ifAbsentPut: [ self parseTree ]
   110 
   111 
       
   112     "Modified: / 23-12-2020 / 08:30:34 / Jan Vrany <jan.vrany@labware.com>"
   111 !
   113 !
   112 
   114 
   113 compiledMethod
   115 compiledMethod
   114     ^ self
   116     ^ self
   115 !
   117 !
   137 
   139 
   138 parseTree
   140 parseTree
   139 
   141 
   140     ^(RBParser 
   142     ^(RBParser 
   141         parseMethod: self sourceCode 
   143         parseMethod: self sourceCode 
   142         onError: [ :msg :pos | ^ nil ]) methodClass: self methodClass.
   144         onError: [ :msg :pos | ^ nil ])
       
   145 
       
   146     "Modified: / 22-12-2020 / 22:34:32 / Jan Vrany <jan.vrany@labware.com>"
   143 !
   147 !
   144 
   148 
   145 selector
   149 selector
   146     "Retrieves the name of the method"
   150     "Retrieves the name of the method"
   147 
   151 
   166     ^ 'unresolvedMessage', String cr, String tab, '"source code for the method model not set"'
   170     ^ 'unresolvedMessage', String cr, String tab, '"source code for the method model not set"'
   167 !
   171 !
   168 
   172 
   169 sourceCodeForNoSource
   173 sourceCodeForNoSource
   170 
   174 
   171     ^ self selector asMethodPreamble, String cr, String tab, '"source code for the method model not set"'
   175     ^ (Parser methodSpecificationForSelector: self selector), String cr, '    "source code for the method model not set"'
       
   176 
       
   177     "Modified: / 22-12-2020 / 22:11:23 / Jan Vrany <jan.vrany@labware.com>"
   172 ! !
   178 ! !
   173 
   179 
   174 !RGMethod methodsFor:'accessing - backend'!
   180 !RGMethod methodsFor:'accessing - backend'!
   175 
   181 
   176 author
   182 author
   519 isMethod
   525 isMethod
   520 
   526 
   521     ^true
   527     ^true
   522 ! !
   528 ! !
   523 
   529 
       
   530 !RGMethod class methodsFor:'documentation'!
       
   531 
       
   532 version_HG
       
   533 
       
   534     ^ '$Changeset: <not expanded> $'
       
   535 ! !
       
   536