-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/token improvement #3
Conversation
moosbruggerj
commented
Mar 25, 2019
- added factory methods for tokens
- added convenience constructors for generating asts without the need to provide all tokens
- added support for delimiter tokens in lists
changed Token class to include generation script hooks various: removed GrammarToken.h reference used token singletons instead
* identifier: if name starts with '$' or '$$' the modifier is correctly set
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
==========================================
- Coverage 44.54% 40.36% -4.18%
==========================================
Files 35 37 +2
Lines 1805 2113 +308
==========================================
+ Hits 804 853 +49
- Misses 1001 1260 +259
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good work @moosbruggerj, I've found some minor issues, please fix them and then we can merge this PR ASAP 🚀
| TCF, | ||
| }; | ||
|
|
||
| using FormulaFlags = libstdhl::Enum::Flags< FormulaFlag >; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
|
||
| t.add< FormulaDefinition >( | ||
| uToken, uToken, y, uToken, Role::axiom(), uToken, f, uToken, uToken ); | ||
| t.add< FormulaDefinition >( y, Role::axiom(), f ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
| AT "@" | ||
| AND "&" | ||
| DOLLAR "$" | ||
| DOLLARDOLLAR "$$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/Helper.cpp
Outdated
| #include "Helper.h" | ||
|
|
||
| using namespace libtptp; | ||
| /* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this compilation unit file Helper.cpp, because it does not contain any implementation!
src/Helper.h
Outdated
| using ListNodeElements = ListElements< Node >; | ||
|
|
||
| } | ||
| #endif /* _LIBTPTP_HELPER_H_ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #endif /* _LIBTPTP_HELPER_H_ */ | |
| #endif // _LIBTPTP_HELPER_H_ | |
| } | ||
|
|
||
| const Token::Ptr Identifier::systemModifier( void ) const | ||
| const Token::Ptr& Identifier::modifier( void ) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better now!
src/Identifier.h
Outdated
| private: | ||
| const Token::Ptr m_systemModifier; | ||
| const Token::Ptr m_definedModifier; | ||
| const std::pair< const Token::Ptr, const std::string > modifierTokenFromName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this function a class method? It is only used in the compilation unit Identifier.cpp, please remove this line here and use a static function implementation inside of the compilation unit.
| , m_rightBraceToken( rightBraceToken ) | ||
| { | ||
| } | ||
| ListLiteral::ListLiteral( const ListNodeElements::Ptr& elements ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ListLiteral::ListLiteral( const ListNodeElements::Ptr& elements ) | |
| ListLiteral::ListLiteral( const ListNodeElements::Ptr& elements ) |