Golf an InterpretMe interpreter

Python 3, 35 bytes

i=1
while i:i+=input().count('*')-1

sets i to one, adds the amount of '*' -1 to i

I think I can reduce this with ~ trickery I couldn't


Python 3, 39 38 bytes

def f():[f()for c in input()if c=="*"]

Saved 1 byte thanks to @atlasologist


Ruby, 29 bytes

i=1
i+=gets.count ?*while$.<i

Ruby's magical variable $. keeps track of the number of lines read from stdin. Keep reading input while this number is lower than the count of asterisks (plus the initial 1).

Tags:

Code Golf