• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

programming language


Commit MetaInfo

Revisión084f84ce1945b2d9396b6d03a7692073d0727487 (tree)
Tiempo2021-11-14 23:07:04
Autordhrname <dhrname@joes...>
Commiterdhrname

Log Message

Support an Unsigned Number

Cambiar Resumen

Diferencia incremental

Binary files a/bin/joestar.exe and b/bin/joestar.exe differ
Binary files a/bin/obj/main.o and b/bin/obj/main.o differ
--- a/main.cpp
+++ b/main.cpp
@@ -387,9 +387,12 @@ namespace jstr
387387 * 整数の値を表すクラス*/
388388 class IntegerTypeValue: public Phrase
389389 {
390+ private:
391+ bool isSigned;
390392 public:
391- explicit IntegerTypeValue(const uint64_t t)
392- : Phrase::Phrase{t}
393+ explicit IntegerTypeValue(const uint64_t t, const bool b = true)
394+ : Phrase::Phrase{t},
395+ isSigned{b}
393396 {
394397 }
395398 };
@@ -689,15 +692,19 @@ namespace jstr
689692 std::cout << lexer->YYText() << std::endl;
690693 break;
691694 case UINTEGER8:
695+ ast = this->nest(ast, abstractSyntaxTreeRoot->makeNode(new jstr::IntegerTypeValue(8, false)) );
692696 std::cout << lexer->YYText() << std::endl;
693697 break;
694698 case UINTEGER16:
699+ ast = this->nest(ast, abstractSyntaxTreeRoot->makeNode(new jstr::IntegerTypeValue(16, false)) );
695700 std::cout << lexer->YYText() << std::endl;
696701 break;
697702 case UINTEGER32:
703+ ast = this->nest(ast, abstractSyntaxTreeRoot->makeNode(new jstr::IntegerTypeValue(32, false)) );
698704 std::cout << lexer->YYText() << std::endl;
699705 break;
700706 case UINTEGER64:
707+ ast = this->nest(ast, abstractSyntaxTreeRoot->makeNode(new jstr::IntegerTypeValue(64, false)) );
701708 std::cout << lexer->YYText() << std::endl;
702709 break;
703710 case FLOAT: