Add parsing

This commit is contained in:
2022-03-20 19:57:38 +01:00
parent be59171ebe
commit d5785629ea
18 changed files with 1052 additions and 192 deletions

View File

@@ -0,0 +1,36 @@
Class {
#name : #CarpFile,
#superclass : #Object,
#instVars : [
'fileName',
'contents'
],
#category : #Carp
}
{ #category : #'instance creation' }
CarpFile class >> for: aFileName [
^ self new for: aFileName
]
{ #category : #accessing }
CarpFile >> contents [
^ contents
]
{ #category : #accessing }
CarpFile >> contents: aString [
contents := aString
]
{ #category : #accessing }
CarpFile >> fileName: aFileName [
fileName := aFileName
]
{ #category : #accessing }
CarpFile >> for: aFileName [
self fileName: aFileName.
self contents: (CarpParser parse: aFileName asFileReference contents).
]