diff --git a/.github/workflows/tonel.yml b/.github/workflows/tonel.yml index a73882c..fe85648 100644 --- a/.github/workflows/tonel.yml +++ b/.github/workflows/tonel.yml @@ -1,13 +1,6 @@ name: Tonel-dev -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: +on: [ push, pull_request ] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: diff --git a/MonticelloTonel-Core.package/TonelParser.class/instance/basicNewTraitDefinitionFrom..st b/MonticelloTonel-Core.package/TonelParser.class/instance/basicNewTraitDefinitionFrom..st deleted file mode 100644 index abd6e70..0000000 --- a/MonticelloTonel-Core.package/TonelParser.class/instance/basicNewTraitDefinitionFrom..st +++ /dev/null @@ -1,18 +0,0 @@ -private - factory -basicNewTraitDefinitionFrom: anArray - - | metadata definition | - metadata := anArray sixth. - definition := (MCTraitDefinition named: (metadata at: #name)) - comment: (anArray second ifNil: [ '' ]); - yourself. - - metadata - at: #traits ifPresent: [ :composition | definition traitComposition: composition ]; - at: #classTraits ifPresent: [ :composition | definition classTraitComposition: composition ]; - at: #instVars ifPresent: [ :ivar | definition instVarNames: ivar ]; - at: #classInstVars ifPresent: [ :classIVar | definition classInstVarNames: classIVar ]. - - self addPackageInfoTo: definition from: metadata. - - ^ definition \ No newline at end of file diff --git a/MonticelloTonel-Core.package/TonelParser.class/instance/newTraitDefinitionFrom..st b/MonticelloTonel-Core.package/TonelParser.class/instance/newTraitDefinitionFrom..st index 72d3c47..f265a7a 100644 --- a/MonticelloTonel-Core.package/TonelParser.class/instance/newTraitDefinitionFrom..st +++ b/MonticelloTonel-Core.package/TonelParser.class/instance/newTraitDefinitionFrom..st @@ -1,18 +1,15 @@ private - factory newTraitDefinitionFrom: anArray - | metadata traitDefs | + | metadata definition | metadata := anArray sixth. - traitDefs := { (self basicNewTraitDefinitionFrom: anArray) }. - - traitDefs first hasClassTraitComposition ifTrue: [ - | definition | - definition := (MCClassTraitDefinition baseTraitName: (metadata at: #name)) - classTraitComposition: (metadata at: #classTraits); - yourself. - - self addPackageInfoTo: definition from: metadata. - - traitDefs := traitDefs copyWith: definition ]. - - ^ traitDefs \ No newline at end of file + definition := (MCTraitDefinition named: (metadata at: #name)) + comment: (anArray second ifNil: [ '' ]); + yourself. + metadata + at: #traits ifPresent: [ :composition | definition traitComposition: composition ]; + at: #classTraits ifPresent: [ :composition | definition classTraitComposition: composition ]; + at: #instVars ifPresent: [ :ivar | definition instVarNames: ivar ]; + at: #classInstVars ifPresent: [ :classIVar | definition classInstVarNames: classIVar ]. + self addPackageInfoTo: definition from: metadata. + ^ definition \ No newline at end of file diff --git a/MonticelloTonel-Core.package/TonelReader.class/class/definitionOrders.st b/MonticelloTonel-Core.package/TonelReader.class/class/definitionOrders.st index 6be8c4c..711ae1d 100644 --- a/MonticelloTonel-Core.package/TonelReader.class/class/definitionOrders.st +++ b/MonticelloTonel-Core.package/TonelReader.class/class/definitionOrders.st @@ -5,5 +5,4 @@ definitionOrders MCOrganizationDefinition. 0. MCMethodDefinition. 1. MCClassDefinition. 2. - MCTraitDefinition. 2. - MCClassTraitDefinition. 3 } \ No newline at end of file + MCTraitDefinition. 2} \ No newline at end of file diff --git a/MonticelloTonel-Core.package/monticello.meta/categories.st b/MonticelloTonel-Core.package/monticello.meta/categories.st index b6ec159..e24f4ff 100644 --- a/MonticelloTonel-Core.package/monticello.meta/categories.st +++ b/MonticelloTonel-Core.package/monticello.meta/categories.st @@ -1,6 +1 @@ -SystemOrganization addCategory: #'MonticelloTonel-Core'! -SystemOrganization addCategory: #'MonticelloTonel-Core-Base'! -SystemOrganization addCategory: #'MonticelloTonel-Core-Errors'! -SystemOrganization addCategory: #'MonticelloTonel-Core-Reading'! -SystemOrganization addCategory: #'MonticelloTonel-Core-Utilities'! -SystemOrganization addCategory: #'MonticelloTonel-Core-Writing'! +self packageOrganizer ensurePackage: #'MonticelloTonel-Core' withTags: #(#Base #Errors #Reading #Utilities #Writing)!