Grammalecte  Check-in [2ae38c10dc]

Overview
Comment:[build][js] fix graph rules builder
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | build | rg
Files: files | file ages | folders
SHA3-256: 2ae38c10dcc46c6fbdfff7fab682f64c0d45bd5e2bf42b02321d609dbc143dc5
User & Date: olr on 2018-09-10 11:00:58
Other Links: branch diff | manifest | tags
Context
2018-09-10
13:00
[core][js] gc engine: fix syntax errors check-in: 516c08196b user: olr tags: core, rg
11:00
[build][js] fix graph rules builder check-in: 2ae38c10dc user: olr tags: build, rg
09:15
[build][js] build graph rules for JS check-in: 7f7a39e30f user: olr tags: build, rg
Changes

Modified compile_rules_js_convert.py from [9aa0239064] to [6f9b1d0f6a].

   152    152                   sArray += json.dumps(lActions, ensure_ascii=False) + ", "
   153    153                   sArray += json.dumps(aGroups, ensure_ascii=False) + ", "
   154    154                   sArray += json.dumps(aNegLookBehindRegex, ensure_ascii=False) + "],\n"
   155    155               sArray += "  ]],\n"
   156    156           else:
   157    157               sArray += '  ["' + sOption + '", [\n'
   158    158               for sGraphName, sLineId in aRuleGroup:
   159         -                sArray += '    ["' + sGraphName + '", "' + sLineId + '"],\n"'
          159  +                sArray += '    ["' + sGraphName + '", "' + sLineId + '"],\n'
   160    160               sArray += "  ]],\n"
   161    161       sArray += "]"
   162    162       return sArray
   163    163   
   164    164   
   165    165   def groupsPositioningCodeToList (sGroupsPositioningCode):
   166    166       "convert <sGroupsPositioningCode> to a list of codes (numbers or strings)"
   167    167       if not sGroupsPositioningCode:
   168    168           return None
   169    169       return [ int(sCode)  if sCode.isdigit() or (sCode[0:1] == "-" and sCode[1:].isdigit())  else sCode \
   170    170                for sCode in sGroupsPositioningCode.split(",") ]