Project

General

Profile

10597a_v2.patch

Stefanel Pezamosca, 09/23/2025 06:41 AM

Download (3.63 KB)

View differences:

new/rules/annotations/array_expansion.rules 2025-09-23 10:28:18 +0000
5 5
** Module   : array_expansion.rules
6 6
** Abstract : convert implicit array refs into explicit versions
7 7
**
8
** Copyright (c) 2005-2023, Golden Code Development Corporation.
8
** Copyright (c) 2005-2025, Golden Code Development Corporation.
9 9
**
10 10
** _#_ _I_ __Date__ __JPRM__ ___________________________________Description___________________________________
11 11
** 001 GES 20051122   @23445 Some (mostly UI) language statements support
......
67 67
**                           versions, based on node types rather on string paths.
68 68
** 026 CA  20230501          Avoid the subscript in 'DEF VAR  ... LIKE v[1]', as the subscript must not be
69 69
**                           validated.
70
** 027 SP  20250923          Mark created prog.num_literal nodes with "is-literal" annotation.
70 71
*/
71
 -->
72
-->
73

  
72 74
<!--
73 75
** This program is free software: you can redistribute it and/or modify
74 76
** it under the terms of the GNU Affero General Public License as
......
173 175
            <action>ref = createProgressAst(prog.expression, "", ref)</action>
174 176
         </rule>
175 177
         <expression>
176
            createProgressAst(prog.num_literal, string(#(long) element), ref)
178
            ref = createProgressAst(prog.num_literal, string(#(long) element), ref)
177 179
         </expression>
180
         <expression>ref.putAnnotation("is-literal", true)</expression>
178 181
         <expression>dupref.clearIds()</expression>
179 182
      </function>
180 183
   
......
412 415
                  </action>
413 416
               </rule>
414 417
               <action>
415
                  createProgressAst(prog.num_literal, "1", bogusRef)
418
                  bogusRef = createProgressAst(prog.num_literal, "1", bogusRef)
416 419
               </action>
420
               <action>bogusRef.putAnnotation("is-literal", true)</action>
417 421
            </rule>
418 422
            
419 423
            <!-- only certain statements get expansions -->
new/rules/annotations/frame_scoping.rules 2025-09-23 10:33:00 +0000
482 482
** 207 TJD 20230328          Do not backreference default frame for CLEAR.
483 483
** 208 LS  20250108          Added support for empty DISPLAY.
484 484
** 209 SP  20250127          Removed support for custom denormalized extents.
485
** 210 SP  20250922          Fixed widget search for EXTENT field items.
485 486
*/
486 487
-->
487 488

  
......
4192 4193
                     <rule>node.getChildAt(0) == null and txt1.equals(txt2)
4193 4194
                        <action>res = ref</action>
4194 4195
                     </rule>
4196

  
4197
                     <!-- check item of EXTENT field -->
4198
                     <rule>node.getNumImmediateChildren() == 1 and
4199
                           txt1.equals(txt2)
4200
                        <action>res = ref</action>
4201
                     </rule>
4195 4202
                  </rule>
4196 4203
               </rule>
4197 4204
            </while>
......
4591 4598
                                 txt1.equals(txt2)
4592 4599
                              <action>res = frame</action>
4593 4600
                           </rule>
4601

  
4602
                           <!-- check item of EXTENT field -->
4603
                           <rule>node.getNumImmediateChildren() == 1 and
4604
                                 txt1.equals(txt2)
4605
                              <action>res = frame</action>
4606
                           </rule>
4594 4607
                        </rule>
4595 4608
                        
4596 4609
                        <rule>is_w and nm.equals(ref.text.toLowerCase())