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