Rhino.DSL
Takes all the code that exists in a module's global section and put it in a specificied
method of a class. Allow easy handling of the Anonymous Base Class pattern
Create new instance of
The base class that will be used
The name of the method that will get all the code from globals moved to it.
Namespaces that would be automatically imported into all modules
Create new instance of
The base class that will be used
The name of the method that will get all the code from globals moved to it.
The parameters of this method
Namespaces that would be automatically imported into all modules
Run this compiler step
Allow a derived class to perform additional operations on the newly created type definition.
Automatically imports all the specified namespaces to all the modules
in the compilation unit
This probably belongs early in the compilation process
Initializes a new instance of the class.
The namespaces.
Runs this instance.
Add the namespaces to the module
This delegate is used to abstract getting the data from a url.
This allows us to plug in more smarts when needed (for instance, hooking into the
Castle.Resources system)
This compiler step will auotmatically compiler and reference all files specified in import clauses such as:
import file from "[file name]"
Another option is:
import namespaces from "[file name]"
In which case all the namespaces defined in that file will be imported into the current file
Create a new instance of
Create a new instance of
The base directory to resolve files from
Create a new instance of
The url resolver to use
Create a new instance of
The base directory to resolve files from
The url resolver to use
Add the desired import behavior.
This creates a copy of the passed compiler parameters, without the stuff
that make a compilation unique, like input, output assembly, etc
Run the current compiler step
Provide cache support for a DSL
Cahce interface for the DslEngine
Try to get a cached type for this URL.
The url to use as a key for the cache
The compiled DSL or null if not found
Put the type in the cache, with the url as the key
Removes the url for the from cache.
The URL.
Try to get a cached type for this URL.
The url to use as a key for the cache
The compiled DSL or null if not found
Put the type in the cache, with the url as the key
Removes the url for the from cache.
The URL.
Base class for DSL engines, handles most of the routine tasks that a DSL
engine needs to do. Compilation, caching, creation, etc.
Initializes a new instance of the class.
Create a new instance of this DSL type.
The type to create
optional ctor paraemters
The newly created instance
Compile the DSL and return the resulting context
The files to compile
The resulting compiler context
Create an exception that would be raised on compilation errors.
Customise the compiler to fit this DSL engine.
This is the most commonly overriden method.
Get a type from the assembly according to the URL.
This is used to match a class with its originating file
Gets or sets the cache.
The cache.
Gets or sets the storage for this DSL
The storage.
The type of assembly compilation should produce
Manage the creation of DSL instances, cache and creates them.
This is used to mark urls that should be compiled on their own
usually this means scripts that has been changed after they were
compiled
Register a new DSL engine that is tied to a specific base type
Create a new DSL instance
The base type of the DSL
The url to read the DSL file from
optional ctor parameters
The dsl instance
Create a new DSL instance
The base type of the DSL
The url to read the DSL file from
optional ctor parameters
The dsl instance
Creates instances of all the DSL that are located directly under the parent URL.
The type of the DSL base.
The parent URL.
The parameters.
Check if there was a DSL registered for this base type.
The base directory to read all the relative url from.
Occurs when a compilation is completed
Useful to track how many assemblies has been loaded
by the DslFactory
Occurs when recompilation of a script is completed.
Useful to track how many assemblies has been loaded by
the DslFactory
Handles the storage requirements for the DSL from a file system.
Implementors of this class will
handle all the storage requirements for the DSL.
Where the scripts are located, when they are refreshed, etc
Will retrieve all the _canonised_ urls from the given directory that
this Dsl Engine can process.
Will call the action delegate when any of the specified urls are changed.
Note that for a single logical change several calls may be made.
The urls.
The action.
Create a compiler input from the URL.
The url
The compiler input
Determines whether the URL is included in the specified urls
in the given parent path
The urls.
The parent oath.
The URL.
true if [is URL include in] [the specified urls]; otherwise, false.
Gets the type name from URL.
The URL.
Determains whatever the given url is a valid script url.
Create a compiler input from the URL.
The url
The compiler input
Will retrieve all the _canonised_ urls from the given directory that
this Dsl Engine can process.
Compares the two urls
The x.
The y.
Will call the action delegate when any of the specified urls are changed.
Note that for a single logical change several calls may be made.
The urls.
The action.
Determines whether the URL is included in the specified urls
in the given parent path
The urls.
The parent oath.
The URL.
true if [is URL include in] [the specified urls]; otherwise, false.
Gets the type name from URL.
The URL.
Determains whatever the given url is a valid script url.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
2
The file name format of this DSL
This class allows to easily define property generation macros
Initializes a new instance of the class.
Name of the property.
Expands the specified macro.
The macro.
Translate all @foo reference expression to "foo" string literals.
In essense, add symbols to the language
Runs this instance.
Called when visting a reference expression.
Will turn reference expressions with initial @ to string literals
The node.