Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathPad/MPFunction+MPValue.m
2014-10-13 23:53:04 +02:00

29 lines
683 B
Objective-C

//
// MPFunction+MPValue.m
// MathPad
//
// Created by Kim Wittenburg on 09.10.14.
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
//
#import "MPFunction+MPValue.h"
@implementation MPFunction (MPValue)
- (instancetype)initWithTokenStream:(MPTokenStream *)tokenStream
{
[tokenStream beginIgnoringWhitespaceTokens];
if (tokenStream.currentToken.tokenType != MPGenericFunctionToken) {
@throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"Expected Function" userInfo:nil];
}
[tokenStream endIgnoringOrAcceptingWhitespaceTokens];
return [self init];
}
- (NSArray *)expressionElements
{
return @[self];
}
@end