Thanks for the feedback , Sam. I have started to converte it, but I have some problem with *exceptions.* I have exceptions in the *.idl files, like below. (It is partly converted from .idl to webidl)
[Prefix = "com::sun::star::uno::"] interface XInterface; *exception Exception *{ string Message; _com_sun_star_uno_XInterface Context; }; [Prefix = "com::sun::star::uno::beans::"] *exception *IllegalTypeException: _com_sun_star_uno_Exception { }; Is it possible to use exceptions in webIDL? I found these options ( https://webidl.spec.whatwg.org/#dfn-create-exception), but its not clear for me how can I replace the *exception *object type. Ofc, the webidl_binder didn't like it: File "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/WebIDL.py", line 3711, in p_Definition assert p[1] # We might not have implemented something ... AssertionError Thanks for your help, in advance. Balazs On Thursday, November 3, 2022 at 7:20:58 PM UTC+1 s...@google.com wrote: > Those IDL files don't look like they are in WebIDL format ( > https://webidl.spec.whatwg.org/). If you want to use them with > webidl_binder you would need to first convert them to webidl format. > > cheers, > sam > > On Thu, Nov 3, 2022 at 6:16 AM Balázs Varga <balazs....@gmail.com> wrote: > >> Hi All, >> >> I am facing with a similar problam like this: >> https://lists.w3.org/Archives/Public/public-webapps/2009JanMar/0197.html >> >> I have a lot of .idl files from a project like this one: >> https://api.libreoffice.org/docs/idl/ref/files.html >> There are two .idl example: >> https://api.libreoffice.org/docs/idl/ref/XInterface_8idl_source.html >> https://api.libreoffice.org/docs/idl/ref/XReference_8idl_source.html >> >> *Is it possible to #include existing .idl files with webIDL and then >> creating .cpp and .js from them?* >> >> I tried to make a .cpp and .js file from the original XInterface.idl file >> with './webidl_binder XInterface.idl glue', but as I expected it didn't >> work, because of the #ifndef prepocess >> >> *Can webIDL handle prepocesess like #ifndef #define and/or #include >> existing .idl files with webIDL?* >> >> By the way the error msg was: >> >> Traceback (most recent call last): >> File >> "/home/bvarga/builder/emsdk/upstream/emscripten/tools/./webidl_binder.py", >> line 55, in <module> >> p.parse(r''' >> File >> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/WebIDL.py", >> line 4960, in parse >> >> self._productions.extend(self.parser.parse(lexer=self.lexer,tracking=True)) >> File >> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/ply/ply/yacc.py", >> >> line 263, in parse >> return self.parseopt(input,lexer,debug,tracking,tokenfunc) >> File >> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/ply/ply/yacc.py", >> >> line 792, in parseopt >> tok = self.errorfunc(errtoken) >> File >> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/WebIDL.py", >> line 4909, in p_error >> raise WebIDLError("invalid syntax", [Location(self.lexer, p.lineno, >> p.lexpos, self._filename)]) >> WebIDL.WebIDLError: error: invalid syntax, <unknown> line 22:0 >> #ifndef __com_sun_star_uno_XInterface_idl__ >> ^ >> >> Thanks for the feedback in advance. >> >> Best, >> Balázs >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to emscripten-disc...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/da554b58-e4d8-4c15-9742-2882e45af411n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/emscripten-discuss/da554b58-e4d8-4c15-9742-2882e45af411n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/63b73cf6-dce1-4b17-80d2-e1ae1b8401d1n%40googlegroups.com.