Page MenuHomePhabricator

eolian_mono: add helper to convert Eolian_Value to C# syntax
Closed, ResolvedPublic

Description

There is currently code in src/bin/eolian_mono/eolian/mono/variable_definition.hh, method generate(), that converts an Eolian_Value structure and converts it to C# syntax.
EOLIAN_EXPR_NULL --> null
EOLIAN_EXPR_BOOL --> true or false
etc.

  1. It needs to be extended so it also supports enums values like Efl.Ui.WinMoveResizeMode.Move.
  2. It needs to be moved to a helper class so this conversion method is accessible to other classes.

This will come in handy to fix T8171.

segfaultxavi triaged this task as Normal priority.
lauromoura added a subscriber: brunobelo.

Added a tentative patch (still WIP for cleanup) to devs/lauromoura/default_params that adds default value support for parameter_def. It also modifies documentation.hh with the new sentence (The default value.., but needs to check if the escaping is correct, as that pastebin from irc expired).

Adding this info to eolian_cxx could help implement actual default parameter support in C# bindings.

The branch looks very very nice. I just changed the sentence and added reference links: devs/xartigas/default_params
I also added NULL to the list of supported Eolian expressions.

Merge my branch onto your commit and I think this is ready for review.