activity RF_sendCmdWord (cmd: uint8, dataTx: [SPI_TX_BUF]uint8, len: uint8)(dataRx: [SPI_TX_BUF]uint8) returns int8
SPI_beginTransfer() // external function call
var res: int8
// Send command.
var tmp: [SPI_TX_BUF]uint8 = {cmd}
res = run SPI_txRxBytes(tmp, 1)(dataRx)
if res == 0 then
// Send data.
res = run SPI_txRxBytes(dataTx, len)(dataRx)
end
SPI_endTransfer() // external function call
return res
end
Hi Matthias,
thank you for this suggestion. I do think it may be useful. Feel free to post this as a feature request on
https://github.com/boschresearch/blech-tools/issues
However, we cannot easily support this in the current state of the language services plugin. This is because currently highlighting is done using a grammar only. A grammar only talks about syntactic elements of the language such as keywords or identifiers. It has no clue about semantics – in this case: that the identifier SPI_beginTransfer represents an external function.
To make your idea work we would have to feed back the results from the type checker in the language server and use these results to alter the syntax highlighting. While this should be possible, it requires a redesign of the language service plugin.
Best regards
Friedrich Gretz
--
You received this message because you are subscribed to the Google Groups "blech-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
blech-lang+...@googlegroups.com.
To view this discussion on the web, visit
https://groups.google.com/d/msgid/blech-lang/14245f5e-35bf-453d-95f8-c4f53d2751f3%40googlegroups.com.