Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ASN1-AST/ASN1.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #ASN1 }
Extension { #name : 'ASN1' }

{ #category : #'*asn1-ast' }
{ #category : '*asn1-ast' }
ASN1 >> buildAst [
"read configured root modules, then load all imported modules
recursively"
Expand Down
58 changes: 30 additions & 28 deletions ASN1-AST/ASN1ASTNode.class.st
Original file line number Diff line number Diff line change
@@ -1,136 +1,138 @@
Class {
#name : #ASN1ASTNode,
#superclass : #Object,
#name : 'ASN1ASTNode',
#superclass : 'Object',
#instVars : [
'properties'
],
#category : #'ASN1-AST-Nodes'
#category : 'ASN1-AST-Nodes',
#package : 'ASN1-AST',
#tag : 'Nodes'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
ASN1ASTNode >> addModifier: aModifier [
aModifier ifNotNil: [
self modifiers add: aModifier ].
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> beAssigned [
self propertyAt: #assigned put: true
]

{ #category : #binding }
{ #category : 'binding' }
ASN1ASTNode >> bindingOf: aString [
^ nil
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> defaultValue [
^ (self modifiers
detect: [:each| each isDefaultValue ]
ifNone: [ ^ nil ]) value
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> definition [
^ self
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
ASN1ASTNode >> dereferenced [
^ self
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> hasDefaultValue [
^ self modifiers anySatisfy: [:each| each isDefaultValue ]
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> hasProperty: aString [
^ (self properties at: aString ifAbsent: [ nil ]) notNil
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isAsn1Node [
^ true
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isAsn1ReferenceNode [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isAssigned [
^ self propertyAt: #assigned ifAbsent: [ false ]
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isLiteralNode [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isOptional [
^ self modifiers anySatisfy: [:each| each isOptional ]
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isPrimitiveNode [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isTypeNode [
^ false
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> isValueNode [
^ false
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
ASN1ASTNode >> modifiers [
^ self propertyAt: #modifiers ifAbsentPut: [ Set new ]
]

{ #category : #printing }
{ #category : 'printing' }
ASN1ASTNode >> printOn: aStream [
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> properties [
^ properties ifNil: [
properties := Dictionary new ]
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> propertyAt: aString [
^ self properties at: aString ifAbsent: [ nil ]
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> propertyAt: aString ifAbsent: aBlock [
^ self properties at: aString ifAbsent: aBlock
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> propertyAt: aString ifAbsentPut: aBlock [
^ self properties at: aString ifAbsentPut: aBlock
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> propertyAt: aString ifPresent: aBlock [
^ self properties at: aString ifPresent: aBlock
]

{ #category : #accessing }
{ #category : 'accessing' }
ASN1ASTNode >> propertyAt: aString put: anObject [
self properties at: aString put: anObject
]

{ #category : #testing }
{ #category : 'testing' }
ASN1ASTNode >> providesScope [
^ false
]
Loading
Loading