Aztec® Programming Language
Version 1.1 Alpha 2

Copyright © 2010-2017, Aztec Development Group, All Rights Reserved

Download Aztec

Search        Contact Us

Don't it always seem to go...

That you don't know what you've got 'til it's gone.

- Joni Mitchell

 

The Aztec system provides a number of Compiler methods for use during compile-time logic. There are many methods specific to primitive classes, and they are documented in the framework section for primitive data types. This section describes general purpose compiler methods which provide a variety of system related functions.

 

These methods can be used dynamically during the compile process at the module level, class level and inside compiler methods. Those methods which return a value can also be used within expressions in non-compiler methods. When the expression is processed by the compiler, the compiler method is invoked and the result is treated as a constant within the expression.

Compiler System Methods

CompilerUsePath() Adds a new directory to the path searh list
CompilerSetSpace() Specifies the "space" in which new classes, methods and data will be created
CompilerUseSpace() Adds this "space" to the compiler's search list
CompilerRemoveSpace() Removes this "space" from the compiler's seach list
CompilerIsFlag() Returns true if the specified flag was used on the Aztec compiler command line
CompilerModuleName() Returns the full name of the source file containing the method call
CompilerModuleLine() Returns the line number within the source file where the method call is made
CompilerLoadModule() Loads the specified source code module into the compile process
CompilerAbort() Aborts the Aztec compile process
CompilerTime() Returns the start time for compiler execution in number of seconds since 1970-01-01
CompilerTimeStr() Returns a string representation of the specified time (YYYY-MM-DD HH:MM:SS format)
CompilerVersion() Returns the version of the Aztec compiler as a string (e.g. "1.0 Beta 1")
CompilerWriteLog() Writes the specified string to the compiler log

See Also

 


CompilerUsePath()

public method compiler CompilerUsePath(string Path)

Parameters

Path

Full directory path to be added to the compiler's search path list

Return Value

None

Description

This compiler method adds the specified source directory to the list of search paths used by the compiler. It is appended to the list, so it will become the last directory in the search list. This directory search list is used when loading a source file with CompilerLoadModule().

 

Compiler Method


CompilerSetSpace()

public method compiler CompilerSetSpace(string Space)

Parameters

Space

Aztec "space" to be used as default space

Return Value

None

Description

This compiler method sets the specified Aztec space as the default space. Any identifier (class, data, method, type) which gets created without an explicit space will be created in the default space. If "-space" is not used and if this method is not used, "aztec.script" is the default space.

 

Compiler Method


CompilerUseSpace()

public method compiler CompilerUseSpace(string Space)

Parameters

Space

Aztec "space" to be added to search list

Return Value

None

Description

This compiler method adds the specified Aztec space name to the list of search spaces used by the compiler. It is appended to the list, so it will become the last space in the search list. This space list is used to search for an identifier when it is used without an explicit space.

 

Compiler Method


CompilerRemoveSpace()

public method compiler CompilerRemoveSpace(string Space)

Parameters

Space

Aztec "space" to be removed from the search list

Return Value

None

Description

This compiler method removes the specified Aztec space name from the list of search spaces used by the compiler.

 

Compiler Method


CompilerIsFlag()

public method<bool> compiler CompilerIsFlag(string Flag)

Parameters

Flag

Name of flag being queried

Return Value

Returns true if the flag was specified on the command line

Description

This compiler method returns true if the specified Flag was specified on the Aztec compiler command line (-flag ABC) and false if the flag was not specified on the command line.

 

Compiler Method


CompilerModuleName()

public method<string> compiler CompilerModuleName()

Parameters

None

Return Value

Name of the module in which the method call is made

Description

This compiler method returns the name of the source module in which the method call is being made.

 

Compiler Method


CompilerModuleLine()

public method<int> compiler CompilerModuleLine()

Parameters

None

Return Value

Line number within the module in which the method call is made

Description

This compiler method returns the one based line number within the source module in which the method call is being made.

 

Compiler Method


CompilerLoadModule()

public method compiler CompilerLoadModule(string SourceCode, bool IsFile = true)

Parameters

SourceCode

Source code to be compiled and integrated into the running program - string can be a filename or the actual source code

IsFile

If true, first argument is the name of a file which contains the source code, and if false, the SourceCode argument contains the source code itself

Return Value

None

Description

This compiler method loads the specified Aztec source module and adds it to the compiler's source file list to be compiled when appropriate. It will be parsed and processed according to the Aztec Compiler multi-step compile process. If the file does not exist or cannot be accessed, a fatal compiler error will result.

 

Compiler Method


CompilerAbort()

public method compiler CompilerAbort()

Parameters

None

Return Value

None

Description

This compiler method causes the entire Aztec compile process to be aborted.

 

Compiler Method


CompilerTime()

public method<int> compiler CompilerTime()

Parameters

None

Return Value

Returns the time in seconds

Description

This compiler method returns the time that this compiler session started execution. The value is in number of seconds since 1970-01-01. This number will always be the same for a single execution of the compiler, regardless of how many seconds the compile process takes.

 

Compiler Method


CompilerTimeStr()

public method<string> compiler CompilerTimeStr(int Time = 0)

Parameters

Time

Time (in seconds) to be converted to a string (default of 0)

Return Value

Returns the string representation of the time

Description

This compiler method returns the string representation of the specified time (in seconds since 1970-01-01). If no time is specified, or a value of zero is specified, this method will return the time that this compiler session started execution. Regardless of how long the compile process runs, this value will always be the same. The compiler records the start time and then uses that for the CompilerTime() method and for the default time in this method. The "YYYY-MM-DD HH:MI:SS" format is used.

 

Compiler Method


CompilerVersion()

public method<string> compiler CompilerVersion()

Parameters

None

Return Value

Returns the version of the Aztec Compiler

Description

This compiler method returns the Aztec Compiler version as a string (e.g. "1.1 Alpha 2").

 

Compiler Method


CompilerWriteLog()

public method compiler CompilerWriteLog(string Value)

Parameters

Value

String value to be written to the compiler log

Return Value

NONE

Description

This compiler method writes the specified string value to the compiler log.

 

Compiler Method

 

Copyright © 2010-2017

Aztec Development Group

All Rights Reserved

Download Aztec