<commit_before>import {_, INT as I, SL} from '../bridge.js'

let FLOW = {}

// execute string at index 0
FLOW["es"] = $=> I.exec(I.shift(), 1)

// `es` for number of times given by index 0
FLOW["e*"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  I.addf(a=>{
    if(I.tru(X)){
      I.addf(a=> I.unshift(X - 1, Y), 'e*')
      I.exec(Y, 1)
    }
  })
}

// `es` if index 0 is truthy
FLOW["e&"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  if(I.tru(Y)) I.unshift(X), SL.es()
}

// `es` if index 0 is falsy
FLOW["e|"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  if(!I.tru(Y)) I.unshift(X), SL.es()
}

// `es` on index 1 if index 2 is truthy; otherwise, `es` on index 0
FLOW["e?"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  let Z = I.shift()
  I.unshift(I.tru(Z) ? Y : X)
  SL.es()
}

// while `es` on index 1 is truthy, `es` on index 0
FLOW["ew"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  I.addf(a=>{
    if(I.tru(I.shift())){
      I.addf(a=> I.unshift(X, Y), 'ew')
      I.exec(Y, 1)
    }
  })
  I.exec(X, 1)
}

// `es` line number at index 0
FLOW["e@"] = $=> I.eline(I.shift())

// `es` current line
FLOW["@"] = $=> I.eline(I.lns[0])

// `es` next line
FLOW[";"] = $=> I.eline(I.lns[0] - -1)

// `es` previous line
FLOW[";;"] = $=> I.eline(I.lns[0] - 1)

// end execution of current call stack frame
FLOW["break"] = $=> I.code.shift()

export default FLOW<commit_msg>fix while loop<commit_after>import {_, INT as I, SL} from '../bridge.js'

let FLOW = {}

// execute string at index 0
FLOW["es"] = $=> I.exec(I.shift(), 1)

// `es` for number of times given by index 0
FLOW["e*"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  I.addf(a=>{
    if(I.tru(X)){
      I.addf(a=> I.unshift(X - 1, Y), 'e*')
      I.exec(Y, 1)
    }
  })
}

// `es` if index 0 is truthy
FLOW["e&"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  if(I.tru(Y)) I.unshift(X), SL.es()
}

// `es` if index 0 is falsy
FLOW["e|"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  if(!I.tru(Y)) I.unshift(X), SL.es()
}

// `es` on index 1 if index 2 is truthy; otherwise, `es` on index 0
FLOW["e?"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  let Z = I.shift()
  I.unshift(I.tru(Z) ? Y : X)
  SL.es()
}

// while `es` on index 1 is truthy, `es` on index 0
FLOW["ew"] = $=>{
  let X = I.shift()
  let Y = I.shift()
  I.addf(a=>{
    if(I.tru(I.shift())){
      I.addf(a=> I.unshift(X, Y), 'ew')
      I.exec(X, 1)
    }
  })
  I.exec(Y, 1)
}

// `es` line number at index 0
FLOW["e@"] = $=> I.eline(I.shift())

// `es` current line
FLOW["@"] = $=> I.eline(I.lns[0])

// `es` next line
FLOW[";"] = $=> I.eline(I.lns[0] - -1)

// `es` previous line
FLOW[";;"] = $=> I.eline(I.lns[0] - 1)

// end execution of current call stack frame
FLOW["break"] = $=> I.code.shift()

export default FLOW
{'fraction_non_alphanumeric': 0.25618945102260493, 'fraction_numerical': 0.014352350197344816, 'mean_word_length': 2.524652338811631, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3261732', 'n_tokens_mistral': 1345, 'n_tokens_neox': 1318, 'n_words': 335}