FFI: FFI-Tools-mt.25.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FFI: FFI-Tools-mt.25.mcz

commits-2
Marcel Taeumel uploaded a new version of FFI-Tools to project FFI:
http://source.squeak.org/FFI/FFI-Tools-mt.25.mcz

==================== Summary ====================

Name: FFI-Tools-mt.25
Author: mt
Time: 4 May 2021, 4:52:46.043881 pm
UUID: 231205aa-3bb9-7142-a9d3-e3b1e52e121d
Ancestors: FFI-Tools-mt.24

Shout support for array types. Complements FFI-Kernel-mt.130

=============== Diff against FFI-Tools-mt.24 ===============

Item was changed:
  ----- Method: SHParserST80>>parseExternalCall (in category '*FFI-Tools') -----
  parseExternalCall
 
  self addRangeType: #externalFunctionCallingConvention.
 
  [self scanNext.
  ((Smalltalk at: #ExternalFunction) callingConventionModifierFor: currentToken) notNil]
  whileTrue.
  self failUnless: currentToken notNil.
  self scanPast: #externalCallType.
  currentToken = '*'
  ifTrue: [self scanPast: #externalCallTypePointerIndicator].
+ currentToken = '['
+ ifTrue: ["array types return"
+ self scanPast: #externalCallType.
+ [currentTokenFirst ~= $]]
+ whileTrue: [
+ self failUnless: currentTokenFirst isDigit.
+ self scanPast: #externalCallType].
+ self scanPast: #externalCallType].
  currentTokenFirst isDigit
  ifTrue: [self scanPast: #integer]
  ifFalse: [
  self failUnless: currentTokenFirst == $'.
  self parseString].
  self failUnless: currentTokenFirst == $(.
  self scanPast: #leftParenthesis.
  [currentTokenFirst ~= $)]
  whileTrue: [
  self failUnless: currentToken notNil.
  self scanPast: #externalCallType.
  currentToken = '*'
  ifTrue: [self scanPast: #externalCallTypePointerIndicator]].
  self scanPast: #rightParenthesis.
  currentToken = 'module:'
  ifTrue: [
  self scanPast: #module.
  self parseStringOrSymbol ].
  currentToken = 'error:' ifTrue: [
  self scanPast: #primitive. "there's no rangeType for error"
  self currentTokenType == #name
  ifTrue: [ self parseTemporary: #patternTempVar ]
  ifFalse: [ self parseStringOrSymbol ] ].
  self failUnless: currentToken = '>'.
  self scanPast: #primitiveOrExternalCallEnd!