示例#1
0
文件: repl.py 项目: Danisan/HTTPLang
def enterREPL():

    # loop state code
    loopStatus = {"loopDepth": 0, "rootLoopLength": 0, "loopCode": []}

    while True:
        inp = raw_input(str(utils.lines) + "> ").strip()

        if inp == "quit":
            return

        # update line count
        utils.lines += 1

        # handles loops and executes otherwise
        loopStatus = parse.loopCheckThenParse(utils.lines, inp, loopStatus)
示例#2
0
文件: repl.py 项目: Danisan/HTTPLang
def enterREPL():

    #loop state code
    loopStatus = {'loopDepth': 0, 'rootLoopLength': 0, 'loopCode': []}

    while (True):
        inp = raw_input(str(utils.lines) + "> ").strip()

        if (inp == "quit"):
            return

        #update line count
        utils.lines += 1

        #handles loops and executes otherwise
        loopStatus = parse.loopCheckThenParse(utils.lines, inp, loopStatus)
示例#3
0
文件: repl.py 项目: blecman/HTTPLang
def enterREPL():

    #loop state code
    loopStatus = {'loopDepth': 0, 'rootLoopLength': 0, 'loopCode': []}

    #track inputed line count
    inpLine = 0

    while (True):
        #update line count
        inpLine += 1
        utils.lines = inpLine

        #display prompt
        inp = raw_input(str(utils.lines) + "> ").strip()

        #handles quit directive
        if (inp == "quit"):
            return

        #handles loops and executes otherwise
        loopStatus = parse.loopCheckThenParse(utils.lines, inp, loopStatus)
示例#4
0
文件: repl.py 项目: blecman/HTTPLang
def enterREPL():
    
    #loop state code
    loopStatus = {'loopDepth':0,
                  'rootLoopLength':0,
                  'loopCode':[]}
    
    #track inputed line count
    inpLine = 0
    
    while(True):
        #update line count
        inpLine += 1
        utils.lines = inpLine
        
        #display prompt
        inp = raw_input(str(utils.lines) + "> ").strip()

        #handles quit directive
        if(inp == "quit"):
            return

        #handles loops and executes otherwise    
        loopStatus = parse.loopCheckThenParse(utils.lines,inp,loopStatus)