Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1036483 // tok_script_settable

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (10656L) is out of date.

svoid tok_script_settable(LS tok) {
  int i;
  while ((i = jfind(tok, "settable <id> :")) >= 0) {
    S id = tok.get(i+2);
    int iType = i+6;
    S type = tok_script_scanType(tok, i+6);
    S getter = "def !synthetic " + id + ": " + type + " { this !_getField_ " + id + "}";
    S setter = "def !synthetic " + id + " " + id + ": " + type + " { this " + id + " <- " + id + "; this }";
    replaceToken_reTok(tok, i, joinWithSpace(getter, setter));
  }
}

Author comment

Began life as a copy of #1036295

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1036483
Snippet name: tok_script_settable
Eternal ID of this version: #1036483/7
Text MD5: 22528349243bccc86e47bdedc7a52ae7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-01-21 21:20:10
Source code size: 464 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 155 / 203
Version history: 6 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)