From e095817ac2a8c7f8ab7f9f585b4a2d4cb9dcb3e3 Mon Sep 17 00:00:00 2001 From: Allofich Date: Fri, 21 Apr 2017 19:57:30 +0900 Subject: [PATCH] Treat =< and => as == in scripts (Fixes #3744) --- components/compiler/scanner.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/compiler/scanner.cpp b/components/compiler/scanner.cpp index 720fde9f1..c2ec13b01 100644 --- a/components/compiler/scanner.cpp +++ b/components/compiler/scanner.cpp @@ -408,6 +408,11 @@ namespace Compiler special = S_cmpEQ; else if (c=='=') special = S_cmpEQ; + else if (c == '>' || c == '<') // Treat => and =< as == + { + special = S_cmpEQ; + mErrorHandler.warning (std::string("invalid operator =") + c + ", treating it as ==", mLoc); + } else { special = S_cmpEQ;