Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9b833f94e01e5d3e6478673152ca428d1fce2467
Ticket: 2251175fffffffffffffffffffffffffffffffff
Expand ({*}), constants, and list syntax
User & Date: nijtmans on 2008-11-16 15:05:33
Changes

  1. icomment:
    My only remark is that things like:
        case TCL_TOKEN_TEXT|TCL_TOKEN_MUSTCOLLAPSE:
    look confusing: it tests for the new token type
    (a variant of TCL_TOKEN_TEXT). I would not introduce
    the concept of 'modifiers' for tokens, especially not if
    this will be backported to Tcl 8.5. Why not just use
    a new token type, like TCL_TOKEN_UNCOLLAPSED_TEXT
    (bikeshed warning: I don't mind the exact name)
    
    Then in tcl.h we get:
         #define TCL_TOKEN_UNCOLLAPSED_TEXT 512
    
    The above
        case TCL_TOKEN_TEXT|TCL_TOKEN_MUSTCOLLAPSE:
    will simplify to
        case TCL_TOKEN_UNCOLLAPSED_TEXT:
    
    Expressions like originally:
        if (bodyToken[i]->type == TCL_TOKEN_TEXT) {
    which you changed to:
        if (bodyToken[i]->type & TCL_TOKEN_TEXT) {
    would become:
        if (bodyToken[i]->type & (TCL_TOKEN_TEXT|TCL_TOKEN_UNCOLLAPSED_TEXT)) {
    
    This would make the intention of the patch more clear. It makes the
    remark you put in tcl.h unneccessary, and the case statement
    less confusing.
    
    Apart form that, it looks fine to me.
    
    My $.02
    
    Regards,
              Jan Nijtmans
    
    
  2. login: "nijtmans"
  3. mimetype: "text/plain"
  4. username: "nijtmans"