- Variable declaration standardization. Big commit.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3671 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz@gmail.com
2012-05-25 19:26:36 +00:00
parent cfd59cf0a2
commit c2c7a3bcda
131 changed files with 1493 additions and 1402 deletions

View File

@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/*
File: Binary Operators
*/
@@ -6,8 +8,7 @@
Represents a binary operator in the AST. A binary operator takes two operands (ie x and y) and returns a value.
*/
/node/expression/operator/binary
var
node/expression/exp2
var/node/expression/exp2
////////// Comparison Operators //////////
/*
@@ -170,4 +171,4 @@
*/
//
Modulo
precedence=OOP_MULTIPLY
precedence=OOP_MULTIPLY

View File

@@ -1,3 +1,5 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/* --- Traffic Control Scripting Language --- */
// Nanotrasen TCS Language - Made by Doohl
@@ -16,14 +18,13 @@
/* -- Compile a raw block of text -- */
proc/Compile(code as message)
var
n_scriptOptions/nS_Options/options = new()
n_Scanner/nS_Scanner/scanner = new(code, options)
list/tokens = scanner.Scan()
n_Parser/nS_Parser/parser = new(tokens, options)
node/BlockDefinition/GlobalBlock/program = parser.Parse()
var/n_scriptOptions/nS_Options/options = new()
var/n_Scanner/nS_Scanner/scanner = new(code, options)
var/list/tokens = scanner.Scan()
var/n_Parser/nS_Parser/parser = new(tokens, options)
var/node/BlockDefinition/GlobalBlock/program = parser.Parse()
list/returnerrors = list()
var/list/returnerrors = list()
returnerrors += scanner.errors
returnerrors += parser.errors

View File

@@ -1,27 +1,27 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/*
File: Keywords
*/
var/const
KW_FAIL = 0 //Fatal error; stop parsing entire script.
KW_PASS = 1 //OK
KW_ERR = 2 //Non-fatal error, keyword couldn't be handled properly. Ignore keyword but continue on.
KW_WARN = 3 //Warning
var/const/KW_FAIL = 0 //Fatal error; stop parsing entire script.
var/const/KW_PASS = 1 //OK
var/const/KW_ERR = 2 //Non-fatal error, keyword couldn't be handled properly. Ignore keyword but continue on.
var/const/KW_WARN = 3 //Warning
/*
Class: n_Keyword
Represents a special statement in the code triggered by a keyword.
var/const/Class: n_Keyword
var/const/Represents a special statement in the code triggered by a keyword.
*/
/n_Keyword
New(inline=0)
src.inline=inline
return ..()
var
/*
Var: inline
1 if the keyword is in an expression (e.g. the new keyword in many languages), 0 otherwise (such as the if and else keywords).
*/
inline
var/inline
/*
Proc: Parse
@@ -163,4 +163,4 @@ var/const
parser.AddBlock(def.block)
else
parser.errors+=new/scriptError/BadToken(parser.curToken)
return KW_FAIL
return KW_FAIL

View File

@@ -1,12 +1,13 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/*
Class: Token
Represents an entity and position in the source code.
*/
/token
var
value
line
column
var/value
var/line
var/column
New(v, l=0, c=0)
value=v
@@ -24,9 +25,8 @@
value=text2num(value)
ASSERT(!isnull(value))
accessor
var
object
member
var/object
var/member
New(object, member, l=0, c=0)
src.object=object
@@ -35,4 +35,4 @@
src.line=l
src.column=c
end
end