Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forall seems to break syntax #44

Closed
ghost opened this issue Jan 16, 2018 · 8 comments
Closed

forall seems to break syntax #44

ghost opened this issue Jan 16, 2018 · 8 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jan 16, 2018

Example:

screen shot 2018-01-16 at 00 29 36

Looks like it's somehow related to the parentheses? Wrapping the return value in parens "fixes" it:

screen shot 2018-01-16 at 00 30 19

@faustinoaq
Copy link
Member

Good catch!

I think this issue is related to #9

BTW, Do you know if sublime text have this issue?

@Proximyst
Copy link

Proximyst commented Mar 20, 2018

I would like to add how this works fine:

    def convert?(input : String) : T? forall T
      converter = ConversionManager.global_converters![T.name]
      converter ||= convert
    end

picture of proof in the editor

This however only cursives the method in question instead of everything:

      def inner! : TypeConverter(T) forall T
        @inner.as TypeConverter(T)
      end

picture of proof in the editor

@faustinoaq
Copy link
Member

Hi @Proximyst Thank you for your comment!, To fix this issue I need to do some changes in current syntax file

An alternative is replacing current json file and return back to tmLanguage file, but I don't know if ST has this issue as well 😅

@Proximyst
Copy link

The fact there are no issues on it so far indicates it most likely isn't there. You could however try to type out the snippet yourself.

I by the way found out why the inner! method had cursive, and that's as the initialize method uses forall as well, but is an empty method.

module Cropt
  module Internal
    struct TypeConverter
      def initialize(@inner : Cropt::TypeConverter(T)) forall T
      end

      def inner! : TypeConverter(T) forall T
        @inner.unsafe_as TypeConverter(T)
      end
    end
  end
end

@faustinoaq faustinoaq self-assigned this Apr 6, 2018
@faustinoaq faustinoaq added the bug label Apr 6, 2018
@faustinoaq faustinoaq added this to To do in Crystal Tools via automation Apr 6, 2018
@faustinoaq
Copy link
Member

An alternative is replacing current json file and return back to tmLanguage file, but I don't know if ST has this issue as well sweat_smile

The fact there are no issues on it so far indicates it most likely isn't there.

So, I think I gonna replace my custom crystal.json syntax by official TextMate Crystal.tmLanguage or Sublime Crystal.tmLanguage 😅 WDYT?

@faustinoaq
Copy link
Member

screenshot_20180517_042606

Looks like is working fine with TextMate Crystal.tmLanguage 🎉

Will be available on next release 😉

@Proximyst
Copy link

That looks great. Thanks for the look into the issue ^^

@faustinoaq
Copy link
Member

next minor version 0.3.11 (available soon on vscode marketplace) fixes this (thanks to @icyleaf)

Crystal Tools automation moved this from To do to Done Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Crystal Tools
  
Done
Development

No branches or pull requests

2 participants