Sirshark10

Interpreter for Esoteric Language '+'

Jul 26th, 2016
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local args = {...}
  2. local file = io.open(args[1],"r")
  3. local counter = 0
  4. while true do
  5. local nLine = file:lines()()
  6. if not nLine then
  7. break
  8. end
  9. if string.find(nLine,"+") then
  10. local _, count = string.gsub(nLine,"+","+")
  11. counter = counter + count
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment