Fix Warning/Deprecation
This commit is contained in:
@@ -9,6 +9,7 @@ import std.uni;
|
|||||||
import std.utf;
|
import std.utf;
|
||||||
import std.conv;
|
import std.conv;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
static import std.algorithm;
|
||||||
struct Trace
|
struct Trace
|
||||||
{
|
{
|
||||||
int slot;
|
int slot;
|
||||||
@@ -1966,7 +1967,7 @@ class InputCode : Code
|
|||||||
{
|
{
|
||||||
vm.push(Value(to!double(s)));
|
vm.push(Value(to!double(s)));
|
||||||
}
|
}
|
||||||
catch
|
catch(Throwable)
|
||||||
{
|
{
|
||||||
error = true;
|
error = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -817,7 +817,7 @@ class BuiltinFunction
|
|||||||
{
|
{
|
||||||
formattedRead(time, "%d:%d:%d", &H, &M, &S);
|
formattedRead(time, "%d:%d:%d", &H, &M, &S);
|
||||||
}
|
}
|
||||||
catch
|
catch (Throwable)
|
||||||
{
|
{
|
||||||
throw new IllegalFunctionCall("TMREAD", 1);
|
throw new IllegalFunctionCall("TMREAD", 1);
|
||||||
}
|
}
|
||||||
@@ -837,6 +837,7 @@ class BuiltinFunction
|
|||||||
if (isInputRange!Source && isSomeChar!(ElementType!Source) && !is(Source == enum) &&
|
if (isInputRange!Source && isSomeChar!(ElementType!Source) && !is(Source == enum) &&
|
||||||
isFloatingPoint!Target && !is(Target == enum))
|
isFloatingPoint!Target && !is(Target == enum))
|
||||||
{
|
{
|
||||||
|
static import core.stdc.math;
|
||||||
static immutable real[14] negtab =
|
static immutable real[14] negtab =
|
||||||
[ 1e-4096L,1e-2048L,1e-1024L,1e-512L,1e-256L,1e-128L,1e-64L,1e-32L,
|
[ 1e-4096L,1e-2048L,1e-1024L,1e-512L,1e-256L,1e-128L,1e-64L,1e-32L,
|
||||||
1e-16L,1e-8L,1e-4L,1e-2L,1e-1L,1.0L ];
|
1e-16L,1e-8L,1e-4L,1e-2L,1e-1L,1.0L ];
|
||||||
@@ -3928,14 +3929,15 @@ class BuiltinFunction
|
|||||||
static wstring getBasicName(BFD)(const wstring def)
|
static wstring getBasicName(BFD)(const wstring def)
|
||||||
{
|
{
|
||||||
enum attr = __traits(getAttributes, __traits(getOverloads, BFD.C_, BFD.N)[BFD.I_]);
|
enum attr = __traits(getAttributes, __traits(getOverloads, BFD.C_, BFD.N)[BFD.I_]);
|
||||||
|
wstring r = def;
|
||||||
foreach(i; attr)
|
foreach(i; attr)
|
||||||
{
|
{
|
||||||
static if(__traits(compiles, i.naame))
|
if(__traits(compiles, i.naame))
|
||||||
{
|
{
|
||||||
return i.naame;
|
r = (cast(BasicName)i).naame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return def;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static this()
|
static this()
|
||||||
@@ -3989,19 +3991,21 @@ template GetOutStartSkip(BFD)
|
|||||||
enum so = __traits(getAttributes, __traits(getOverloads, BFD.C_, BFD.N)[BFD.I_])[0];
|
enum so = __traits(getAttributes, __traits(getOverloads, BFD.C_, BFD.N)[BFD.I_])[0];
|
||||||
int GetOutStartSkip()
|
int GetOutStartSkip()
|
||||||
{
|
{
|
||||||
|
auto result = 0;
|
||||||
int k;
|
int k;
|
||||||
foreach (j, i; ParameterIdentifierTuple!(__traits(getOverloads, BFD.C_, BFD.N)[BFD.I_]))
|
foreach (j, i; ParameterIdentifierTuple!(__traits(getOverloads, BFD.C_, BFD.N)[BFD.I_]))
|
||||||
{
|
{
|
||||||
if(i == so.name)
|
if(i == so.name)
|
||||||
{
|
{
|
||||||
return k;
|
result = k;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if(BFD.ParameterStorageClass[j] & ParameterStorageClass.out_)
|
else if(BFD.ParameterStorageClass[j] & ParameterStorageClass.out_)
|
||||||
{
|
{
|
||||||
k++;
|
k++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import otya.smilebasic.vm;
|
|||||||
import otya.smilebasic.type;
|
import otya.smilebasic.type;
|
||||||
import otya.smilebasic.error;
|
import otya.smilebasic.error;
|
||||||
import otya.smilebasic.systemvariable;
|
import otya.smilebasic.systemvariable;
|
||||||
|
import otya.smilebasic.builtinfunctions;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
struct DebugData
|
struct DebugData
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import std.file;
|
|||||||
import std.conv;
|
import std.conv;
|
||||||
import std.csv;
|
import std.csv;
|
||||||
import std.net.curl;
|
import std.net.curl;
|
||||||
|
import std.algorithm;
|
||||||
|
|
||||||
struct ConsoleCharacter
|
struct ConsoleCharacter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import std.ascii;
|
|||||||
import std.stdio;
|
import std.stdio;
|
||||||
import std.conv;
|
import std.conv;
|
||||||
import std.range;
|
import std.range;
|
||||||
|
static import std.uni;
|
||||||
class Lexical
|
class Lexical
|
||||||
{
|
{
|
||||||
TokenType[] table;
|
TokenType[] table;
|
||||||
@@ -1128,7 +1129,6 @@ class Parser
|
|||||||
}
|
}
|
||||||
return new Use(expr, lex.location);
|
return new Use(expr, lex.location);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case TokenType.Exec:
|
case TokenType.Exec:
|
||||||
{
|
{
|
||||||
lex.popFront();
|
lex.popFront();
|
||||||
@@ -1140,7 +1140,6 @@ class Parser
|
|||||||
}
|
}
|
||||||
return new Exec(expr, lex.location);
|
return new Exec(expr, lex.location);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case TokenType.Swap:
|
case TokenType.Swap:
|
||||||
return swapStatement();
|
return swapStatement();
|
||||||
case TokenType.Linput:
|
case TokenType.Linput:
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ import std.stdio;
|
|||||||
import std.conv;
|
import std.conv;
|
||||||
import std.string;
|
import std.string;
|
||||||
import std.range;
|
import std.range;
|
||||||
|
static import std.algorithm;
|
||||||
import core.stdc.stdio;
|
import core.stdc.stdio;
|
||||||
import core.sync.mutex;
|
import core.sync.mutex;
|
||||||
import core.sync.condition;
|
import core.sync.condition;
|
||||||
|
static import core.stdc.string;
|
||||||
import otya.smilebasic.sprite;
|
import otya.smilebasic.sprite;
|
||||||
import otya.smilebasic.error;
|
import otya.smilebasic.error;
|
||||||
import otya.smilebasic.bg;
|
import otya.smilebasic.bg;
|
||||||
@@ -21,6 +23,7 @@ import otya.smilebasic.graphic;
|
|||||||
import otya.smilebasic.dialog;
|
import otya.smilebasic.dialog;
|
||||||
import otya.smilebasic.program;
|
import otya.smilebasic.program;
|
||||||
import otya.smilebasic.random;
|
import otya.smilebasic.random;
|
||||||
|
static import otya.smilebasic.token;
|
||||||
const static rot_test_deg = 45f;
|
const static rot_test_deg = 45f;
|
||||||
const static rot_test_x = 0f;
|
const static rot_test_x = 0f;
|
||||||
const static rot_test_y = 1f;
|
const static rot_test_y = 1f;
|
||||||
@@ -1235,6 +1238,7 @@ class PetitComputer
|
|||||||
token = lex.front();
|
token = lex.front();
|
||||||
if(token.type != otya.smilebasic.token.TokenType.Integer)
|
if(token.type != otya.smilebasic.token.TokenType.Integer)
|
||||||
{
|
{
|
||||||
|
//TODO:error
|
||||||
console.print("Illegal function call", "\n");
|
console.print("Illegal function call", "\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import otya.smilebasic.error;
|
|||||||
import otya.smilebasic.vm;
|
import otya.smilebasic.vm;
|
||||||
import derelict.sdl2.sdl;
|
import derelict.sdl2.sdl;
|
||||||
import derelict.opengl3.gl;
|
import derelict.opengl3.gl;
|
||||||
|
static import std.uni;
|
||||||
enum SpriteAttr
|
enum SpriteAttr
|
||||||
{
|
{
|
||||||
none = 0,
|
none = 0,
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
module otya.smilebasic.type;
|
module otya.smilebasic.type;
|
||||||
import otya.smilebasic.error;
|
import otya.smilebasic.error;
|
||||||
|
import otya.smilebasic.compiler;
|
||||||
|
import otya.smilebasic.vm;
|
||||||
|
static import std.algorithm;
|
||||||
|
static import std.algorithm.comparison;
|
||||||
enum ValueType : byte
|
enum ValueType : byte
|
||||||
{
|
{
|
||||||
Void,//DEF A()ENDの返り値とか未初期化の変数とか
|
Void,//DEF A()ENDの返り値とか未初期化の変数とか
|
||||||
@@ -20,8 +24,6 @@ enum ValueType : byte
|
|||||||
Data,
|
Data,
|
||||||
Function,
|
Function,
|
||||||
}
|
}
|
||||||
import otya.smilebasic.compiler;
|
|
||||||
import otya.smilebasic.vm;
|
|
||||||
struct Data
|
struct Data
|
||||||
{
|
{
|
||||||
DataTable table;
|
DataTable table;
|
||||||
|
|||||||
Reference in New Issue
Block a user