Skip to content

Commit

Permalink
Merge pull request #74 from moosetechnology/propose-more-configuratio…
Browse files Browse the repository at this point in the history
…n-option

add setter for outptStream
  • Loading branch information
badetitou authored May 2, 2024
2 parents a96edc0 + 52fef19 commit f65942a
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/FAST-Core-Visitor/FASTTExporter.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Trait {
'operatorsPrecedence',
'expressionContextOperator',
'outputStream',
'indentLevel'
'indentLevel',
'indentSize'
],
#category : #'FAST-Core-Visitor'
}
Expand Down Expand Up @@ -143,6 +144,18 @@ FASTTExporter >> indentLevel [
^ indentLevel ifNil: [ indentLevel := 0 ]
]

{ #category : #outputting }
FASTTExporter >> indentSize [

^ indentSize ifNil: [ indentSize := 2 ]
]

{ #category : #accessing }
FASTTExporter >> indentSize: anObject [

indentSize := anObject
]

{ #category : #outputting }
FASTTExporter >> indented: aPrintable [

Expand Down Expand Up @@ -226,8 +239,7 @@ FASTTExporter >> outputExpression: aBlock withOperator: operator [
FASTTExporter >> outputIndentPrefix [
"prints indentation spaces"

self spaces: (self indentLevel * 2)

self spaces: self indentLevel * self indentSize
]

{ #category : #outputting }
Expand All @@ -237,6 +249,12 @@ FASTTExporter >> outputStream [
^outputStream ifNil: [ outputStream := WriteStream on: '' ]
]

{ #category : #outputting }
FASTTExporter >> outputStream: anOutputStream [

^ outputStream := anOutputStream
]

{ #category : #precedence }
FASTTExporter >> outputTopLevelExpression: aBlock [
"Execute aBlock to output an expression.
Expand Down

0 comments on commit f65942a

Please sign in to comment.