Libraryless. Click here for Pure Java version (2347L/15K).
svoid test_tok_findBeginningOfStatement() { LS tok = javaTok([[ if (!enabled) ret; ImageInfo info = latestWithAOA, ret if null;]]); assertEqualsVerbose(7*2+1, tok_findBeginningOfStatement(tok, indexOf(tok, "null"))); tok = javaTok([[ { LS s = x, ret if null;]]); assertEqualsVerbose(1*2+1, tok_findBeginningOfStatement(tok, indexOf(tok, "ret"))); tok = javaTok([[ imageSurfacePopupMenuWhenHighlighted_top(is, voidfunc(JPopupMenu menu, final Rect r) { RecognizedText rec = findByField(lines, +r), ret if null;]]); assertEqualsVerbose(get(tok, tok_findBeginningOfStatement(tok, indexOf(tok, "ret"))+2), "rec"); }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025038 |
Snippet name: | test_tok_findBeginningOfStatement |
Eternal ID of this version: | #1025038/7 |
Text MD5: | 91537302611f1c67bd85db198ecd4e57 |
Transpilation MD5: | 454d72d8076d8495c36783a81d3bac2e |
Author: | stefan |
Category: | javax / transpiling |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-01 20:58:13 |
Source code size: | 642 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 231 / 331 |
Version history: | 6 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1026295 - test_tok_findBeginningOfJavaXTerm |