Changeset 308

Show
Ignore:
Timestamp:
05/27/08 21:42:42 (6 months ago)
Author:
JarrettBillingsley
Message:

Coroutine opApply now starts at index 0 instead of 1. Compiler changed slightly for switch-case statements so that they play nice with the CLI.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/v2/minid/baselib.d

    r305 r308  
    750750        s.push(s.getUpvalue(0u)); 
    751751        s.push(thread); 
    752         s.push(0); 
     752        s.push(-1); 
    753753        return 3; 
    754754    } 
  • branches/v2/minid/commandline.d

    r299 r308  
    6868code will be run.  If there is an error, the code buffer is cleared. 
    6969To end interactive mode, use the \"exit()\" function. 
    70  
    71 In interactive mode, you will also have access to a function \"repr()\" 
    72 which will print out a readable representation of a variable, more 
    73 readable than what you get from toString() anyway.  The first param is 
    74 the value to output; the optional second param should be 'true' to output 
    75 a newline after printing the value, or 'false' not to.  Defaults to true. 
    7670"; 
    7771/+ Stupid editor has issues with multiline strings. "+/ 
     
    246240            // static so the interrupt can access it. 
    247241            static bool didHalt = false; 
    248              
     242 
    249243            static extern(C) void interruptHandler(int s) 
    250244            { 
  • branches/v2/minid/compiler.d

    r304 r308  
    70137013 
    70147014        List!(CaseStatement) cases; 
     7015         
     7016        cases.add(CaseStatement.parse(l)); 
    70157017 
    70167018        while(l.type == Token.Type.Case) 
    70177019            cases.add(CaseStatement.parse(l)); 
    7018  
    7019         if(cases.length == 0) 
    7020             throw new MDCompileException(location, "Switch statement must have at least one case statement"); 
    70217020 
    70227021        DefaultStatement caseDefault;