Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | cherrypick 3bcf97f766: array index syntax done. ${...} not yet complete wrt backslashes. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | tip-465 |
Files: | files | file ages | folders |
SHA1: |
52073ab224971646715839b770fa51fd |
User & Date: | avl 2017-03-05 11:22:33.522 |
Context
2017-03-05
| ||
19:38 | Deal with backslashes in ${...}, change "char" to "character" in error, fix tests. check-in: 05efac2985 user: avl tags: tip-465 | |
11:22 | cherrypick 3bcf97f766: array index syntax done. ${...} not yet complete wrt backslashes. check-in: 52073ab224 user: avl tags: tip-465 | |
11:04 | Create new branch named "tip-465" check-in: 64cf6142f5 user: avl tags: tip-465 | |
2017-03-01
| ||
10:03 | Implement (9): disallow $arr((() and ${{{} resulting in a consistent version of (4) check-in: 3bcf97f766 user: avl tags: avl-tip-282 | |
Changes
Changes to generic/tclParse.c.
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + | TYPE_SPACE, TYPE_SPACE, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_SPACE, TYPE_NORMAL, TYPE_QUOTE, TYPE_NORMAL, TYPE_SUBS, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, |
︙ | |||
1362 1363 1364 1365 1366 1367 1368 | 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 | - + | int append) /* Non-zero means append tokens to existing * information in parsePtr; zero means ignore * existing tokens in parsePtr and * reinitialize it. */ { Tcl_Token *tokenPtr; register const char *src; |
︙ | |||
1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 | 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 | + + - + + + + | * parentheses is the array element name. * 3. The $ sign is followed by something that isn't a letter, digit, or * underscore: in this case, there is no variable name and the token is * just "$". */ if (*src == '{') { char ch; src++; numBytes--; tokenPtr->type = TCL_TOKEN_TEXT; tokenPtr->start = src; tokenPtr->numComponents = 0; ch = *src; |
︙ | |||
1479 1480 1481 1482 1483 1484 1485 | 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 | - + - + + + + + + + + + | if (array) { /* * This is a reference to an array element. Call ParseTokens * recursively to parse the element name, since it could contain * any number of substitutions. */ |
︙ |
Changes to generic/tclParse.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | + + | /* * Minimal set of shared macro definitions and declarations so that multiple * source files can make use of the parsing table in tclParse.c */ #define TYPE_NORMAL 0 #define TYPE_SPACE 0x1 #define TYPE_COMMAND_END 0x2 #define TYPE_SUBS 0x4 #define TYPE_QUOTE 0x8 #define TYPE_CLOSE_PAREN 0x10 #define TYPE_CLOSE_BRACK 0x20 #define TYPE_BRACE 0x40 #define TYPE_OPEN_PAREN 0x80 #define TYPE_BAD_ARRAY_INDEX (TYPE_OPEN_PAREN|TYPE_CLOSE_PAREN|TYPE_QUOTE|TYPE_BRACE) #define CHAR_TYPE(c) (tclCharTypeTable+128)[(int)(c)] MODULE_SCOPE const char tclCharTypeTable[]; |