Skip to content

Commit

Permalink
changing attributeNamed: for parser state
Browse files Browse the repository at this point in the history
  • Loading branch information
j-brant committed Oct 25, 2024
1 parent 6ba4551 commit f4664bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/SmaCC_GLR_Runtime/SmaCCParserState.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ SmaCCParserState >> = anObject [

{ #category : #accessing }
SmaCCParserState >> attributeNamed: aSymbol [
^attributes ifNil: [ nil ] ifNotNil: [ attributes at: aSymbol ]
^ attributes ifNil: [ nil ] ifNotNil: [ attributes at: aSymbol ifAbsent: [ ] ]
]

{ #category : #accessing }
SmaCCParserState >> attributeNamed: aSymbol ifAbsent: aBlock [
^ attributes
ifNil: aBlock
ifNotNil: [ attributes at: aSymbol ifAbsent: aBlock ]
]

{ #category : #accessing }
Expand Down

0 comments on commit f4664bc

Please sign in to comment.