| 8 | #include "ParserState.h" |
| 9 | |
| 10 | bool PackOffset::Create( ParserState& state, const ScannerToken& subComponentToken, const ScannerToken* componentToken ) |
| 11 | { |
| 12 | subComponent = -1; |
| 13 | component.start = component.end = nullptr; |
| 14 | |
| 15 | char registerType; |
| 16 | if( !ParseRegisterID( subComponentToken.stringValue.start, |
| 17 | subComponentToken.stringValue.end, |
| 18 | registerType, |
| 19 | subComponent ) || |
| 20 | registerType != 'c' ) |
| 21 | { |
| 22 | state.ShowMessage( subComponentToken.fileLocation, EC_INVALID_PACK_OFFSET ); |
| 23 | return false; |
| 24 | } |
| 25 | else if( componentToken ) |
| 26 | { |
| 27 | component = componentToken->stringValue; |
| 28 | } |
| 29 | return true; |
| 30 | } |
| 31 | |
| 32 | RegisterSpecifier RegisterSpecifier::Register( char type, int index ) |
| 33 | { |