11 Commits

Author SHA1 Message Date
Steve Ramage
c551dd0d48
Update Simple.flex
Changed the fallback character from . to [^] since this serves as a basis of other lexers.
2018-08-22 18:26:49 -07:00
Dmitry Jemerov
e994ab2ed3 Fix nullability issues in SimpleStructureViewElement (IJSDK-333) 2018-03-19 12:18:43 +01:00
Vitalii Dmitriev
10efd969a9
Remove passing a file extension explicitly.
Hello!

In this code, the `SimpleFileType` instance passed as the first argument and the `"simple"` file extension as the second parameter.

As far as I can see in FileTypeManagerImpl:263:
```java
@Override
public void consume(@NotNull FileType fileType) {
  register(fileType, parse(fileType.getDefaultExtension()));
}
```
There is no need to declare it explicitly as it is taken by calling `SimpleFileType.#getDefaultExtension()` by default, so this parameter is redundant.

To make tutorial more simple, I suggest this removal: seeing the second parameter is a bit confusing when we're passing the same value, returned from `getDefaultExtension()`.
Since the tutorial shows the basics, not a flexibility of an API, the parameter can be removed.

Thanks!
2018-02-13 23:12:24 +03:00
Matt Ellis
752347cf5e Update custom language tutorial 2017-10-12 12:11:42 +01:00
Ian Lesperance
a725cd52f8 Explicitly depend on SimpleLanguage.INSTANCE (#34)
The use of `Language.findInstance()` implicitly depended on the fact that
`SimpleLanguage.INSTANCE` was referenced at some earlier point in time. In this
case, that happens because the instantiation of `SimpleParserDefinition`
triggers the instantiation of `COMMENTS`, which relies on
`SimpleTypes.COMMENT`.

When basing one's work on this sample project, however, one may run into
issues. Specifically, the absence of a custom comment token type will mean a
failure to correctly instantiate the singleton language object. Making the
dependence on `SimpleLanguage.INSTANCE` explicit prevents that issue from
occurring.
2017-02-16 00:12:29 +03:00
cheptsov
b5d7eaf461 IJSDK-203 Confusing grammar and no info on comments and whitespaces 2016-11-03 16:45:34 +01:00
cheptsov
040464bc01 IJSDK-203 Confusing grammar and no info on comments and whitespaces 2016-11-03 13:23:01 +01:00
Yann Cébron
404f3f4577 IJSDK-76 Optimize screenshot file sizes 2016-10-27 10:46:40 +02:00
Breandan Considine
10140f33d4 Prefer wildcard imports to maximize vertical visibility in code samples
Too bad there isn't a way to filter lines with Jekyll Liquid tags
2016-03-21 16:59:17 -04:00
Breandan Considine
f416f02ce2 Tidy up code samples and wrap at 80 chars #IJSDK-24 2016-03-21 16:08:47 -04:00
breandan considine
eddddd5205 First build for GH pages 2016-01-14 19:38:06 -08:00