summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSiddharth <siddharth952@gmail.com>2019-03-23 20:09:08 +0530
committerSiddharth <siddharth952@gmail.com>2019-03-23 20:09:08 +0530
commit13ead635d93737d3817568e87941db663f5190d9 (patch)
tree37594dc8f775ac647367ef77c18a6a19a5e8dfd5 /modules
parent2d995372d8e4e47086fbf0b8a71224cd7b763f81 (diff)
parent9c3ddf05cb9c59817d885e9daca6e8f61c89dc97 (diff)
Merge branch 'master' of https://github.com/godotengine/godot into issue1
Diffstat (limited to 'modules')
-rw-r--r--modules/mono/editor/script_class_parser.cpp14
-rw-r--r--modules/mono/utils/mono_reg_utils.cpp8
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/mono/editor/script_class_parser.cpp b/modules/mono/editor/script_class_parser.cpp
index 6b2ec5cc20..dfb652a7aa 100644
--- a/modules/mono/editor/script_class_parser.cpp
+++ b/modules/mono/editor/script_class_parser.cpp
@@ -266,6 +266,20 @@ Error ScriptClassParser::_skip_generic_type_params() {
if (tk == TK_IDENTIFIER) {
tk = get_token();
+ // Type specifications can end with "?" to denote nullable types, such as IList<int?>
+ if (tk == TK_SYMBOL) {
+ tk = get_token();
+ if (value.operator String() != "?") {
+ error_str = "Expected " + get_token_name(TK_IDENTIFIER) + ", found unexpected symbol '" + value + "'";
+ error = true;
+ return ERR_PARSE_ERROR;
+ }
+ if (tk != TK_OP_GREATER && tk != TK_COMMA) {
+ error_str = "Nullable type symbol '?' is only allowed after an identifier, but found " + get_token_name(tk) + " next.";
+ error = true;
+ return ERR_PARSE_ERROR;
+ }
+ }
if (tk == TK_PERIOD) {
while (true) {
diff --git a/modules/mono/utils/mono_reg_utils.cpp b/modules/mono/utils/mono_reg_utils.cpp
index 0eb4b3b8b3..d7f9b22c31 100644
--- a/modules/mono/utils/mono_reg_utils.cpp
+++ b/modules/mono/utils/mono_reg_utils.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "mono_reg_utils.h"
+#include "core/os/dir_access.h"
#ifdef WINDOWS_ENABLED
@@ -200,6 +201,13 @@ String find_msbuild_tools_path() {
val += "\\";
}
+ // Since VS2019, the directory is simply named "Current"
+ String msBuildDirectory = val + "MSBuild\\Current\\Bin";
+ if (DirAccess::exists(msBuildDirectory)) {
+ return msBuildDirectory;
+ }
+
+ // Directory name "15.0" is used in VS 2017
return val + "MSBuild\\15.0\\Bin";
}
}