Skip to content

renatoalencar/jdk-emoji

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OpenJDK hack that accept (some) Emojis as identifiers

This is just a fork joke, where I imagined what if we could do this?

import java.util.Scanner;

class IsEven {
  static boolean 🀞(int πŸ‘) {
    return πŸ‘ % 2 == 0;
  }

  public static void main(String[] args) {
    Scanner πŸ˜„ = new Scanner(System.in);

    System.out.println("Enter a number: ");
    int πŸ™ƒ = πŸ˜„.nextInt();
    πŸ˜„.close();

    if (🀞(πŸ™ƒ)) {
      System.out.println("Is even");
      return;
    }

    System.out.println("Isn't even");
  }
}

So, I hacked the lexer and added Emoji characters as valid for identifiers.

In order to build, follow the instructions in doc/building.md

About

OpenJDK with Emoji πŸ˜‰

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 80.0%
  • C++ 13.4%
  • C 4.9%
  • Objective-C 0.4%
  • HTML 0.4%
  • XSLT 0.3%
  • Other 0.6%