summary refs log tree commit diff stats
path: root/compiler/sem.nim
Commit message (Collapse)AuthorAgeFilesLines
* Destructors: more moves for tuples (#9808)cooldome2018-11-271-1/+1
|
* added first version of a nimfind tool for the poor souls that don't have a ↵Andreas Rumpf2018-11-141-2/+2
| | | | good nimsuggest integretation
* make Nim take roughly 100MB less RAM for bootstrapping via a new compiler ↵Andreas Rumpf2018-11-071-1/+4
| | | | switch -d:leanCompiler; useful for the Raberry PI
* Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-1/+1
| | | | | | | | | | | | | | | gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux
* compiler: show name of instantiating context in error traces (#6763) (#9207)xzfc2018-10-111-1/+1
|
* Make the registered passes local to the ModuleGraph (#9259)LemonBoy2018-10-091-1/+1
| | | Closes #9068
* make tests green againAndreas Rumpf2018-09-241-2/+10
|
* extended system.type/typeof to support an upcoming 'collect' macro that ↵Andreas Rumpf2018-09-111-4/+4
| | | | works much better than sugar.lc
* change runnableExamples implementation; fixes #8641; fixes #7135; ↵Andreas Rumpf2018-09-021-23/+0
| | | | runnableExamples works for templates and generics
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-1/+1
|
* fixes merge conflictAraq2018-08-071-1/+2
|\
| * runnableExamples: keep (gitignored) generated foo_examples.nim for ↵Timothee Cour2018-08-071-1/+2
| | | | | | | | | | | | inspection even on success (#8544)
* | use slashes instead of dots for pathsAndreas Rumpf2018-08-06
discard """
  file: "tstrutil.nim"
  output: "ha/home/a1xyz/usr/bin"
"""
# test the new strutils module

import
  strutils

proc testStrip() =
  write(stdout, strip("  ha  "))

proc main() = 
  testStrip()
  for p in split("/home/a1:xyz:/usr/bin", {':'}):
    write(stdout, p)

proc testDelete = 
  var s = "0123456789ABCDEFGH"
  delete(s, 4, 5)
  assert s == "01236789ABCDEFGH"
  delete(s, s.len-1, s.len-1)
  assert s == "01236789ABCDEFG"
  delete(s, 0, 0)
  assert s == "1236789ABCDEFG"

testDelete()  
    
assert(insertSep($1000_000) == "1_000_000")
assert(insertSep($232) == "232")
assert(insertSep($12345, ',') == "12,345")
assert(insertSep($0) == "0")

assert(editDistance("prefix__hallo_suffix", "prefix__hallo_suffix") == 0)
assert(editDistance("prefix__hallo_suffix", "prefix__hallo_suffi1") == 1)
assert(editDistance("prefix__hallo_suffix", "prefix__HALLO_suffix") == 5)
assert(editDistance("prefix__hallo_suffix", "prefix__ha_suffix") == 3)
assert(editDistance("prefix__hallo_suffix", "prefix") == 14)
assert(editDistance("prefix__hallo_suffix", "suffix") == 14)
assert(editDistance("prefix__hallo_suffix", "prefix__hao_suffix") == 2)

main()
#OUT ha/home/a1xyz/usr/bin
light'>
| |
* | refactoring: remove idents.legacy global variable and pass the IdentCache ↵Andreas Rumpf2018-05-271-7/+7
| | | | | | | | around explicitly
* | more refactoringAndreas Rumpf2018-05-271-1/+1
| |
* | Merge branch 'devel' into araq-big-refactoringAndreas Rumpf2018-05-271-0/+1
|\|
| * fix #7883; fix #7829Zahary Karadjov2018-05-261-0/+1
| |
* | remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-16/+16
| |
* | preparations of making compiler/msgs.nim free of global variablesAndreas Rumpf2018-05-171-1/+1
| |
* | remove ast.emptyNode global; cleanup configuration.nimAraq2018-05-161-1/+1
|/
* options.nim: no global variables anymoreAndreas Rumpf2018-05-131-5/+5
|
* sem pass compiles againAndreas Rumpf2018-05-121-22/+22
|
* more modules compile againAndreas Rumpf2018-05-121-13/+16
|
* more modules compile againAndreas Rumpf2018-05-121-24/+27
|
* compiler refactoring, pass config around explicitlyAndreas Rumpf2018-05-051-3/+3
|
* fixes #7601, array construction of ptr generics (#7671)andri lim2018-04-271-2/+3
| | | | | | * fixes #7601, array construction of ptr generics * add more test
* allow setting template/macro recursive evaluation limits (#7652)jcosborn2018-04-191-1/+1
| | | | | | | * allow setting template/macro recursive evaluation limits * revert setting template/macro eval limits set them to 1000
* introduce nkTupleConstr AST node for unary tuple construction; breaking changeAndreas Rumpf2018-04-131-1/+1
|
* symbol files: delay the emission of forwarded procsAraq2018-02-211-0/+1
|
* symbol files: more progressAraq2018-02-201-1/+2
|
* new .rod file implementation; part 1: writing of the fileAraq2018-02-171-1/+2
|
* fixes #6946Andreas Rumpf2018-02-051-5/+10
|
* preparations for language extensions: 'sink' and 'lent' typesAndreas Rumpf2018-01-071-2/+2
|
* symbol files: fixes the logic for multi-methodsAraq2018-01-031-0/+4
|