summary refs log tree commit diff stats
path: root/web/documentation.txt
Commit message (Expand)AuthorAgeFilesLines
* website updatedAraq2015-11-181-7/+10
* documented NimScriptAraq2015-09-071-0/+3
* fixed website path"Araq2015-07-181-1/+1
* website improvementsAraq2015-07-181-0/+4
* Add NEP1 to documentation.Varriount2015-07-101-0/+3
* final website changesAraq2015-05-041-8/+8
* version 0.11.2Araq2015-05-041-8/+8
* more cleanups for 0.11.0Araq2015-04-301-10/+11
* Revert docs & learn pages to RTF againPhilipWitte2015-02-131-39/+27
* Fixed website banner HTML & JavascriptPhilipWitte2015-02-081-22/+39
* new websiteAraq2014-12-101-1/+51
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
* fixed pango/pangoutils new wrappersAndreas Rumpf2010-02-261-0/+0
* continued work on html/xmlparserrumpf_a@web.de2010-02-141-0/+0
* added tools and web dirsAndreas Rumpf2009-09-151-0/+1
* deleted web and distAndreas Rumpf2008-08-231-1/+0
* first releaseRumpf2008-06-231-0/+0
* Initial importAndreas Rumpf2008-06-221-0/+1
26c15305'>^
a325692fb ^
5de900b45 ^
4be0d1652 ^

a325692fb ^
5de900b45 ^
4be0d1652 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33








                                                   
                                                         
                                                         
                                 




                                                                   

                               
                     
 

                                                               
                
                                 
                                                
                                                 
                

                                                   
                                                   
                
             
#
#
#           The Nim Compiler
#        (c) Copyright 2015 Andreas Rumpf
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

## Plugin support for the Nim compiler. Right now plugins
## need to be built with the compiler only: plugins using
## DLLs or the FFI will not work.

import ast, semdata, idents

type
  Transformation* = proc (c: PContext; n: PNode): PNode {.nimcall.}
  Plugin* = tuple
    package, module, fn: string
    t: Transformation

proc pluginMatches*(ic: IdentCache; p: Plugin; s: PSym): bool =
  if s.name.id != ic.getIdent(p.fn).id:
    return false
  let module = s.skipGenericOwner
  if module == nil or module.kind != skModule or
      module.name.id != ic.getIdent(p.module).id:
    return false
  let package = module.owner
  if package == nil or package.kind != skPackage or
      package.name.id != ic.getIdent(p.package).id:
    return false
  return true