Changeset 1605
- Timestamp:
- 08/28/08 07:42:22 (3 months ago)
- Location:
- cobra/trunk/Source
- Files:
-
- 3 modified
-
CobraParser.cobra (modified) (1 diff)
-
Expr.cobra (modified) (1 diff)
-
Tokenizer.cobra (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/CobraParser.cobra
r1596 r1605 1662 1662 isMissingType = true 1663 1663 # note: isTypeless is currently used to generate a warning in .paramDecls above, but in the future it may also be needed for when parameter types are inferred for anon methods 1664 p = Param(token, type) # CC: put property sets in initializer (absorb next line) 1665 p.isMissingType = isMissingType 1666 p.kind = kind 1667 return p 1664 return Param(token, type, isMissingType=isMissingType, kind=kind) 1668 1665 1669 1666 -
cobra/trunk/Source/Expr.cobra
r1603 r1605 1495 1495 i += 1 1496 1496 name = '_ch_ext_init_[.serialNum]' # ch = class helper, ext = extended, init = initializer 1497 m = Method(token.copy('ID', name), box, name, paramsForDecl, _type, nil, ['shared', 'private'], AttributeList(), '') 1498 m.isCompilerGenerated = true 1497 m = Method(token.copy('ID', name), box, name, paramsForDecl, _type, nil, ['shared', 'private'], AttributeList(), '', isCompilerGenerated=true) 1499 1498 m.locals.add(LocalVar(token.copy('ID', 'obj'), .type)) 1500 1499 -
cobra/trunk/Source/Tokenizer.cobra
r1574 r1605 441 441 """ 442 442 tokens = List<of IToken>() 443 start = DateTime.now443 # start = DateTime.now 444 444 while true 445 445 t = .nextToken … … 447 447 else, break 448 448 # determine timings for various Tokenizer lexing changes 449 if false # CC: can use /# ... #/ in the future 450 duration = DateTime.now.subtract(start) 451 if tokens.count > 100 and duration > TimeSpan(0) 452 ticksPerToken = (duration.ticks to int) / tokens.count 453 ticksPerTokenMS = ticksPerToken / 10_000 454 fileName = _fileName 455 if fileName.startsWith('('), fileName = '(None)' 456 else, fileName = Path.getFileName(fileName) 457 print '[fileName.padRight(20)]\t[duration]\t[tokens.count]\t' stop 458 print ' [ticksPerTokenMS:N3] ms/Token av ([ticksPerTokenMS/1000:N3]sec)' 449 /# 450 duration = DateTime.now.subtract(start) 451 if tokens.count > 100 and duration > TimeSpan(0) 452 ticksPerToken = (duration.ticks to int) / tokens.count 453 ticksPerTokenMS = ticksPerToken / 10_000 454 fileName = _fileName 455 if fileName.startsWith('('), fileName = '(None)' 456 else, fileName = Path.getFileName(fileName) 457 print '[fileName.padRight(20)]\t[duration]\t[tokens.count]\t' stop 458 print ' [ticksPerTokenMS:N3] ms/Token av ([ticksPerTokenMS/1000:N3]sec)' 459 #/ 459 460 return tokens 460 461 … … 940 941 return t 941 942 942 # CC: get firstChars from var is override 943 get firstChars as List<of char> is override 944 return _firstChars 945 946 # CC: get length from var is override 947 get length as int is override 948 return _length 943 get firstChars from var is override 944 945 get length from var is override 949 946 950 947 get regExSource from var
